root: use docker action during release

closes #738

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-28 21:03:13 +02:00
parent 4da0c81f44
commit 43c87f87c3

View file

@ -10,21 +10,25 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Login Registry - name: Docker Login Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKER_PASSWORD }} username: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_USERNAME }}
- name: Building Docker Image - name: Building Docker Image
run: docker build uses: docker/build-push-action@v2
--no-cache with:
-t beryju/authentik:2021.4.4 push: true
-t beryju/authentik:latest tags: |
-f Dockerfile . beryju/authentik-proxy:2021.4.4,
- name: Push Docker Container to Registry (versioned) beryju/authentik-proxy:latest,
run: docker push beryju/authentik:2021.4.4 ghcr.io/goauthentik/authentik:2021.4.4,
- name: Push Docker Container to Registry (latest) ghcr.io/goauthentik/authentik:latest
run: docker push beryju/authentik:latest platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
build-proxy: build-proxy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -38,23 +42,27 @@ jobs:
go get -u github.com/go-swagger/go-swagger/cmd/swagger go get -u github.com/go-swagger/go-swagger/cmd/swagger
swagger generate client -f ../swagger.yaml -A authentik -t pkg/ swagger generate client -f ../swagger.yaml -A authentik -t pkg/
go build -v . go build -v .
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Login Registry - name: Docker Login Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKER_PASSWORD }} username: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_USERNAME }}
- name: Building Docker Image - name: Building Docker Image
run: | uses: docker/build-push-action@v2
cd outpost/ with:
docker build \ push: true
--no-cache \ tags: |
-t beryju/authentik-proxy:2021.4.4 \ beryju/authentik-proxy:2021.4.4,
-t beryju/authentik-proxy:latest \ beryju/authentik-proxy:latest,
-f proxy.Dockerfile . ghcr.io/goauthentik/proxy:2021.4.4,
- name: Push Docker Container to Registry (versioned) ghcr.io/goauthentik/proxy:latest
run: docker push beryju/authentik-proxy:2021.4.4 context: proxy/
- name: Push Docker Container to Registry (latest) file: proxy/proxy.Dockerfile
run: docker push beryju/authentik-proxy:latest platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
build-static: build-static:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -62,23 +70,26 @@ jobs:
- name: prepare ts api client - name: prepare ts api client
run: | run: |
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/swagger.yaml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0 docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/swagger.yaml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Login Registry - name: Docker Login Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKER_PASSWORD }} username: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_USERNAME }}
- name: Building Docker Image - name: Building Docker Image
run: | uses: docker/build-push-action@v2
cd web/ with:
docker build \ push: true
--no-cache \ tags: |
-t beryju/authentik-static:2021.4.4 \ beryju/authentik-static:2021.4.4,
-t beryju/authentik-static:latest \ beryju/authentik-static:latest,
-f Dockerfile . ghcr.io/goauthentik/static:2021.4.4,
- name: Push Docker Container to Registry (versioned) ghcr.io/goauthentik/static:latest
run: docker push beryju/authentik-static:2021.4.4 context: web/
- name: Push Docker Container to Registry (latest) platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
run: docker push beryju/authentik-static:latest
test-release: test-release:
needs: needs:
- build-server - build-server