actions: push both versioned and :latest tags

This commit is contained in:
Jens Langhammer 2020-01-02 11:19:55 +01:00
parent c448f87027
commit ba8d5d6e27
1 changed files with 13 additions and 9 deletions

View File

@ -1,8 +1,6 @@
name: passbook-release name: passbook-release
on: on:
release: release
types: # This configuration does not affect the page_build event above
- created
jobs: jobs:
# Build # Build
@ -16,9 +14,15 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Building Docker Image - name: Building Docker Image
run: docker build --no-cache -t beryju/passbook:0.7.6-beta -f Dockerfile . run: docker build
- name: Push Docker Container to Registry --no-cache
-t beryju/passbook:0.7.6-beta
-t beryju/passbook:latest
-f Dockerfile .
- name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook:0.7.6-beta run: docker push beryju/passbook:0.7.6-beta
- name: Push Docker Container to Registry (latest)
run: docker push beryju/passbook:latest
build-static: build-static:
runs-on: [ubuntu-latest] runs-on: [ubuntu-latest]
services: services:
@ -42,10 +46,12 @@ jobs:
--no-cache --no-cache
--network=$(docker network ls | grep github | awk '{print $1}') --network=$(docker network ls | grep github | awk '{print $1}')
-t beryju/passbook-static:0.7.6-beta -t beryju/passbook-static:0.7.6-beta
-t beryju/passbook-static:latest
-f static.Dockerfile . -f static.Dockerfile .
- name: Push Docker Container to Registry - name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook-static:0.7.6-beta run: docker push beryju/passbook-static:0.7.6-beta
package-helm: - name: Push Docker Container to Registry (latest)
run: docker push beryju/passbook-static:latest
needs: needs:
- build-server - build-server
- build-static - build-static
@ -56,9 +62,7 @@ jobs:
run: | run: |
apt update && apt install -y curl apt update && apt install -y curl
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm init
- name: Helm package - name: Helm package
run: | run: |
helm dependency update helm/passbook helm dependency update helm/passbook
helm package helm/passbook helm package helm/passbook