ci: fix images not being pushed

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-01 15:03:27 +02:00
parent 95a2fd3c9e
commit 371feb9a31
2 changed files with 6 additions and 6 deletions

View File

@ -185,9 +185,9 @@ jobs:
id: ev id: ev
run: | run: |
python ./scripts/gh_do_set_branch.py python ./scripts/gh_do_set_branch.py
- name: Login to GitHub Container Registry - name: Login to Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
with: with:
registry: beryju.org registry: beryju.org
username: ${{ secrets.HARBOR_USERNAME }} username: ${{ secrets.HARBOR_USERNAME }}
@ -195,7 +195,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: ${{ github.event.pull_request.head.repo.full_name == github.repository }} push: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
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-${{ env.GITHUB_SHA }} beryju.org/authentik/server:gh-${{ env.GITHUB_SHA }}

View File

@ -45,9 +45,9 @@ jobs:
id: ev id: ev
run: | run: |
python ./scripts/gh_do_set_branch.py python ./scripts/gh_do_set_branch.py
- name: Login to GitHub Container Registry - name: Login to Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
with: with:
registry: beryju.org registry: beryju.org
username: ${{ secrets.HARBOR_USERNAME }} username: ${{ secrets.HARBOR_USERNAME }}
@ -55,7 +55,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: ${{ github.event.pull_request.head.repo.full_name == github.repository }} push: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
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 }},