Skip to content

Commit

Permalink
Allow tag based deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
glenndehaan committed Mar 23, 2024
1 parent a693632 commit 997a3ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
push:
branches:
- 'master'
tags:
- '*'

jobs:
docker:
Expand All @@ -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
Expand Down

0 comments on commit 997a3ac

Please sign in to comment.