diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 543d284..6a45b70 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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