Fixed tag generation for releases

This commit is contained in:
Alexey Pustovalov 2021-10-18 17:48:08 +03:00
parent edc9530392
commit fcf6177bdc
2 changed files with 23 additions and 11 deletions

View File

@ -12,6 +12,7 @@ on:
- 'trunk'
paths:
- 'Dockerfiles/**'
- '!**/README.md'
- '!Dockerfiles/*/rhel/*'
- '!Dockerfiles/*/windows/*'
- '.github/workflows/images_build.yml'
@ -81,7 +82,7 @@ jobs:
uses: tj-actions/branch-names@v5
build_base:
timeout-minutes: 90
timeout-minutes: 70
name: Build base on ${{ matrix.os }}
needs: init_build
strategy:
@ -96,7 +97,8 @@ jobs:
with:
fetch-depth: 1
- name: Set up QEMU
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
@ -121,10 +123,13 @@ jobs:
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ env.BASE_BUILD_NAME }}
tags: |
type=ref,event=branch,prefix=${{ matrix.os }}-
type=ref,event=branch,suffix=-${{ matrix.os }}
type=semver,pattern={{version}},prefix=${{ matrix.os }}-
type=semver,pattern={{version}},suffix=-${{ matrix.os }}
type=ref,event=branch,prefix=${{ matrix.os }}-,suffix=-latest
type=ref,event=branch,suffix=-${{ matrix.os }}-latest
type=raw,enable=${{ needs.init_build.outputs.is_default_branch == 'true' }},value=${{matrix.os}}-latest
flavor: |
latest=false
latest=${{ (matrix.os == 'alpine') && (needs.init_build.outputs.is_default_branch == 'true') }}
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
id: docker_build
@ -191,10 +196,13 @@ jobs:
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
tags: |
type=ref,event=branch,prefix=${{ matrix.os }}-
type=ref,event=branch,suffix=-${{ matrix.os }}
type=semver,pattern={{version}},prefix=${{ matrix.os }}-
type=semver,pattern={{version}},suffix=-${{ matrix.os }}
type=ref,event=branch,prefix=${{ matrix.os }}-,suffix=-latest
type=ref,event=branch,suffix=-${{ matrix.os }}-latest
type=raw,enable=${{ needs.init_build.outputs.is_default_branch == 'true' }},value=${{matrix.os}}-latest
flavor: |
latest=false
latest=${{ (matrix.os == 'alpine') && (needs.init_build.outputs.is_default_branch == 'true') }}
- name: Download SHA256 tag build-base:${{ matrix.os }}
uses: actions/download-artifact@v2.0.10
@ -287,10 +295,13 @@ jobs:
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
tags: |
type=ref,event=branch,prefix=${{ matrix.os }}-
type=ref,event=branch,suffix=-${{ matrix.os }}
type=semver,pattern={{version}},prefix=${{ matrix.os }}-
type=semver,pattern={{version}},suffix=-${{ matrix.os }}
type=ref,event=branch,prefix=${{ matrix.os }}-,suffix=-latest
type=ref,event=branch,suffix=-${{ matrix.os }}-latest
type=raw,enable=${{ needs.init_build.outputs.is_default_branch == 'true' }},value=${{matrix.os}}-latest
flavor: |
latest=false
latest=${{ (matrix.os == 'alpine') && (needs.init_build.outputs.is_default_branch == 'true') }}
- name: Download SHA256 tag for ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }}
uses: actions/download-artifact@v2.0.10

View File

@ -12,6 +12,7 @@ on:
- 'trunk'
paths:
- 'Dockerfiles/*/windows/*'
- '!**/README.md'
- '.github/workflows/images_build_windows.yml'
defaults: