ci: run on pr and improve checking for push
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
6b6748b1c7
commit
e76c14f9e0
|
@ -2,8 +2,13 @@ name: authentik-ci-main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- next
|
||||||
|
- version-*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- website
|
- website
|
||||||
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: authentik
|
POSTGRES_DB: authentik
|
||||||
|
@ -224,7 +229,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: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
if: ${{ secrets.HARBOR_USERNAME != "" }}
|
||||||
with:
|
with:
|
||||||
registry: beryju.org
|
registry: beryju.org
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
@ -232,7 +237,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_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
push: ${{ secrets.HARBOR_USERNAME != "" }}
|
||||||
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 }}
|
||||||
|
|
|
@ -2,6 +2,11 @@ name: authentik-ci-outpost
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- next
|
||||||
|
- version-*
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-golint:
|
lint-golint:
|
||||||
|
@ -43,11 +48,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: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
if: ${{ secrets.HARBOR_USERNAME != "" }}
|
||||||
with:
|
with:
|
||||||
registry: beryju.org
|
registry: beryju.org
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
@ -55,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: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
|
push: ${{ secrets.HARBOR_USERNAME != "" }}
|
||||||
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 }}
|
||||||
|
|
|
@ -2,6 +2,11 @@ name: authentik-ci-web
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- next
|
||||||
|
- version-*
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-eslint:
|
lint-eslint:
|
||||||
|
|
Reference in New Issue