updated build to skip pushing images for dev-sha and tags that start with v0.

This commit is contained in:
Abdulmhsen B. A. A
2022-02-17 18:14:16 +03:00
parent 00788f7510
commit 0ade62ccee
2 changed files with 7 additions and 2 deletions

View File

@@ -22,8 +22,8 @@ jobs:
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=dev-latest,enable=${{ endsWith(github.ref, '/dev') }}
type=ref,event=tag
type=sha
type=ref,event=tag,enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=sha,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
flavor: |
latest=false
- name: Login to DockerHub
@@ -38,3 +38,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}