Allow tag based deployments

This commit is contained in:
Glenn de Haan
2024-03-23 18:02:03 +01:00
parent a693632ef0
commit 997a3ac73f

View File

@@ -6,6 +6,8 @@ on:
push:
branches:
- 'master'
tags:
- '*'
jobs:
docker:
@@ -23,7 +25,14 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: glenndehaan/unifi-voucher-site:${{ github.ref_name }}
- name: Build and push (latest)
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64