ci: fix images not being pushed with correct tags
* ci: debug Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: fix branch and sha Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
371feb9a31
commit
933336c38b
|
@ -197,7 +197,7 @@ jobs:
|
|||
with:
|
||||
push: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
tags: |
|
||||
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }},
|
||||
beryju.org/authentik/server:gh-${{ env.GITHUB_SHA }}
|
||||
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }}
|
||||
beryju.org/authentik/server:gh-${{ steps.ev.outputs.sha }}
|
||||
build-args: |
|
||||
GIT_BUILD_HASH=${{ env.GITHUB_SHA }}
|
||||
GIT_BUILD_HASH=${{ steps.ev.outputs.sha }}
|
||||
|
|
|
@ -57,10 +57,10 @@ jobs:
|
|||
with:
|
||||
push: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
tags: |
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.branchName }},
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.branchName }}-${{ steps.ev.outputs.timestamp }},
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ env.GITHUB_SHA }}
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.branchName }}
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.branchName }}-${{ steps.ev.outputs.timestamp }}
|
||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.sha }}
|
||||
file: ${{ matrix.type }}.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
GIT_BUILD_HASH=${{ env.GITHUB_SHA }}
|
||||
GIT_BUILD_HASH=${{ steps.ev.outputs.sha }}
|
||||
|
|
|
@ -4,10 +4,13 @@ from time import time
|
|||
|
||||
env_pr_branch = "GITHUB_HEAD_REF"
|
||||
default_branch = "GITHUB_REF"
|
||||
sha = "GITHUB_SHA"
|
||||
|
||||
branch_name = os.environ[default_branch]
|
||||
if env_pr_branch in os.environ:
|
||||
branch_name = os.environ[env_pr_branch].replace("/", "-")
|
||||
if os.environ.get(env_pr_branch, "") != "":
|
||||
branch_name = os.environ[env_pr_branch]
|
||||
branch_name = branch_name.replace("refs/heads/", "").replace("/", "-")
|
||||
|
||||
print("##[set-output name=branchName]%s" % branch_name)
|
||||
print("##[set-output name=timestamp]%s" % int(time()))
|
||||
print("##[set-output name=sha]%s" % os.environ[sha])
|
||||
|
|
Reference in New Issue