mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-20 01:47:43 +02:00
Prepare universal workflow
This commit is contained in:
parent
ce62b9b66f
commit
6240393eb4
37
.github/workflows/images_build.yml
vendored
37
.github/workflows/images_build.yml
vendored
@ -150,32 +150,23 @@ jobs:
|
|||||||
|
|
||||||
echo "list=$platform_list" >> $GITHUB_OUTPUT
|
echo "list=$platform_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate tags (release)
|
- name: Generate tags
|
||||||
id: meta_release
|
id: meta
|
||||||
if: ${{ needs.init_build.outputs.current_branch != 'trunk' }}
|
if: ${{ needs.init_build.outputs.current_branch != 'trunk' }}
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ env.BASE_BUILD_NAME }}
|
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ env.BASE_BUILD_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}},prefix=${{ matrix.os }}-
|
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ matrix.os }}-
|
||||||
type=semver,pattern={{version}},suffix=-${{ matrix.os }}
|
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ matrix.os }}
|
||||||
type=ref,event=branch,prefix=${{ matrix.os }}-,suffix=-latest
|
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,prefix=${{ matrix.os }}-,suffix=-latest
|
||||||
type=ref,event=branch,suffix=-${{ matrix.os }}-latest
|
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,suffix=-${{ matrix.os }}-latest
|
||||||
type=raw,enable=${{ needs.init_build.outputs.is_default_branch == 'true' }},value=${{matrix.os}}-latest
|
type=raw,enable=${{ (needs.init_build.outputs.current_branch != 'trunk') && (needs.init_build.outputs.is_default_branch == 'true') }},value=${{matrix.os}}-latest
|
||||||
|
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,prefix=${{ matrix.os }}-
|
||||||
|
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,suffix=-${{ matrix.os }}
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=${{ (matrix.os == 'alpine') && ( needs.init_build.outputs.is_default_branch == 'true' ) }}
|
latest=${{ (needs.init_build.outputs.current_branch != 'trunk') && (matrix.os == 'alpine') && ( needs.init_build.outputs.is_default_branch == 'true' ) }}
|
||||||
|
|
||||||
- name: Generate tags (trunk)
|
|
||||||
id: meta_trunk
|
|
||||||
if: ${{ needs.init_build.outputs.current_branch == 'trunk' }}
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
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 }}
|
|
||||||
flavor: |
|
|
||||||
latest=false
|
|
||||||
|
|
||||||
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
|
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -187,9 +178,5 @@ jobs:
|
|||||||
push: ${{ secrets.AUTO_PUSH_IMAGES }}
|
push: ${{ secrets.AUTO_PUSH_IMAGES }}
|
||||||
tags: ${{ steps.meta_release.conclusion == 'skipped' && steps.meta_trunk.outputs.tags || steps.meta_release.outputs.tags }}
|
tags: ${{ steps.meta_release.conclusion == 'skipped' && steps.meta_trunk.outputs.tags || steps.meta_release.outputs.tags }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.revision=${{ steps.meta_release.conclusion == 'skipped' &&
|
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
fromJSON(steps.meta_trunk.outputs.json).labels['org.opencontainers.image.revision'] ||
|
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||||
fromJSON(steps.meta_release.outputs.json).labels['org.opencontainers.image.revision'] }}
|
|
||||||
org.opencontainers.image.created=${{ steps.meta_release.conclusion == 'skipped' &&
|
|
||||||
fromJSON(steps.meta_trunk.outputs.json).labels['org.opencontainers.image.created'] ||
|
|
||||||
fromJSON(steps.meta_release.outputs.json).labels['org.opencontainers.image.created'] }}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user