ci: fix invalid workflow
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
3df8bcfc9c
commit
5e5854e256
|
@ -225,11 +225,13 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: prepare variables
|
- name: prepare variables
|
||||||
id: ev
|
id: ev
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.HARBOR_USERNAME }}
|
||||||
run: |
|
run: |
|
||||||
python ./scripts/gh_do_set_branch.py
|
python ./scripts/gh_do_set_branch.py
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
if: ${{ secrets.HARBOR_USERNAME != "" }}
|
if: ${{ steps.ev.outputs.shouldBuild == 'true' }}
|
||||||
with:
|
with:
|
||||||
registry: beryju.org
|
registry: beryju.org
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
@ -237,7 +239,7 @@ jobs:
|
||||||
- name: Building Docker Image
|
- name: Building Docker Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: ${{ secrets.HARBOR_USERNAME != "" }}
|
push: ${{ steps.ev.outputs.shouldBuild == 'true' }}
|
||||||
tags: |
|
tags: |
|
||||||
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }}
|
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }}
|
||||||
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }}-${{ steps.ev.outputs.timestamp }}
|
beryju.org/authentik/server:gh-${{ steps.ev.outputs.branchName }}-${{ steps.ev.outputs.timestamp }}
|
||||||
|
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
python ./scripts/gh_do_set_branch.py
|
python ./scripts/gh_do_set_branch.py
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
if: ${{ secrets.HARBOR_USERNAME != "" }}
|
if: ${{ steps.ev.outputs.shouldBuild == 'true' }}
|
||||||
with:
|
with:
|
||||||
registry: beryju.org
|
registry: beryju.org
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
- name: Building Docker Image
|
- name: Building Docker Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: ${{ secrets.HARBOR_USERNAME != "" }}
|
push: ${{ steps.ev.outputs.shouldBuild == 'true' }}
|
||||||
tags: |
|
tags: |
|
||||||
beryju.org/authentik/outpost-${{ matrix.type }}:gh-${{ steps.ev.outputs.branchName }}
|
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.branchName }}-${{ steps.ev.outputs.timestamp }}
|
||||||
|
|
|
@ -11,6 +11,9 @@ if os.environ.get(env_pr_branch, "") != "":
|
||||||
branch_name = os.environ[env_pr_branch]
|
branch_name = os.environ[env_pr_branch]
|
||||||
branch_name = branch_name.replace("refs/heads/", "").replace("/", "-")
|
branch_name = branch_name.replace("refs/heads/", "").replace("/", "-")
|
||||||
|
|
||||||
|
should_build = str(os.environ.get("DOCKER_USERNAME", "") != "").lower()
|
||||||
|
|
||||||
print("##[set-output name=branchName]%s" % branch_name)
|
print("##[set-output name=branchName]%s" % branch_name)
|
||||||
print("##[set-output name=timestamp]%s" % int(time()))
|
print("##[set-output name=timestamp]%s" % int(time()))
|
||||||
print("##[set-output name=sha]%s" % os.environ[sha])
|
print("##[set-output name=sha]%s" % os.environ[sha])
|
||||||
|
print("##[set-output name=shouldBuild]%s" % should_build)
|
||||||
|
|
Reference in New Issue