ci: always run on release for version branches but don't push images

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-09 23:09:48 +02:00
parent 9cfeeb35ba
commit d4de243e3b
1 changed files with 8 additions and 3 deletions

View File

@ -3,6 +3,9 @@ name: authentik-on-release
on: on:
release: release:
types: [published, created] types: [published, created]
push:
branches:
- version-*
jobs: jobs:
# Build # Build
@ -25,7 +28,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: true push: ${{ github.event_name == 'release' }}
tags: | tags: |
beryju/authentik:2021.5.1-rc4, beryju/authentik:2021.5.1-rc4,
beryju/authentik:latest, beryju/authentik:latest,
@ -58,7 +61,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: true push: ${{ github.event_name == 'release' }}
tags: | tags: |
beryju/authentik-proxy:2021.5.1-rc4, beryju/authentik-proxy:2021.5.1-rc4,
beryju/authentik-proxy:latest, beryju/authentik-proxy:latest,
@ -92,7 +95,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: true push: ${{ github.event_name == 'release' }}
tags: | tags: |
beryju/authentik-ldap:2021.5.1-rc4, beryju/authentik-ldap:2021.5.1-rc4,
beryju/authentik-ldap:latest, beryju/authentik-ldap:latest,
@ -102,6 +105,7 @@ jobs:
file: outpost/ldap.Dockerfile file: outpost/ldap.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm platforms: linux/amd64,linux/arm64,linux/arm
test-release: test-release:
if: ${{ github.event_name == 'release' }}
needs: needs:
- build-server - build-server
- build-proxy - build-proxy
@ -119,6 +123,7 @@ jobs:
docker-compose start postgresql redis docker-compose start postgresql redis
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik" docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik"
sentry-release: sentry-release:
if: ${{ github.event_name == 'release' }}
needs: needs:
- test-release - test-release
runs-on: ubuntu-latest runs-on: ubuntu-latest