forked from CGM_Public/pretix_original
Update dockerbuild, use Tag if a tag was pushed, latest otherwise
All checks were successful
Build Deploy email notification tool / Apply-Kubernetes-Resources (push) Successful in 10s
All checks were successful
Build Deploy email notification tool / Apply-Kubernetes-Resources (push) Successful in 10s
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: Build Deploy email notification tool
|
name: Build Deploy email notification tool
|
||||||
run-name: ${{ gitea.actor }} building new version of the email notification tool
|
run-name: ${{ gitea.actor }} building new version of the email notification tool
|
||||||
on:
|
on:
|
||||||
push:
|
push: # Baut bei jedem Push (Branches + Tags)
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -10,9 +10,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
run: podman login -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_TOKEN }} cr.ortlerstrasse.de
|
run: podman login -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_TOKEN }} cr.ortlerstrasse.de
|
||||||
|
|
||||||
|
- name: Set Docker Image Tag
|
||||||
|
run: |
|
||||||
|
if [[ "${{ gitea.ref }}" == refs/tags/* ]]; then
|
||||||
|
echo "TAG_NAME=${{ gitea.ref_name }}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "TAG_NAME=latest" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: podman build -t cr.ortlerstrasse.de/cgo/pretix:latest .
|
run: podman build -t cr.ortlerstrasse.de/cgo/pretix:${{ env.TAG_NAME }} .
|
||||||
|
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
run: podman push cr.ortlerstrasse.de/cgo/pretix:latest
|
run: podman push cr.ortlerstrasse.de/cgo/pretix:${{ env.TAG_NAME }}
|
||||||
Reference in New Issue
Block a user