Change Github Action to run on release (#2028)

* Change Docker image release script to run on release
This commit is contained in:
Kevin Chung
2021-11-22 21:11:00 -05:00
committed by GitHub
parent a9aa0cab61
commit 3cbe463dae

View File

@@ -1,13 +1,8 @@
name: Docker build image on release
# on:
# release:
# types: [published]
on:
push:
branches:
- 'master'
release:
types: [published]
jobs:
docker:
@@ -35,18 +30,6 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# -
# name: Build and push
# uses: docker/build-push-action@v2
# with:
# context: .
# platforms: linux/amd64
# push: true
# tags: |
# ctfd/ctfd:latest
# ghcr.io/ctfd/ctfd:latest
# ctfd/ctfd:${{ github.event.release.tag_name }}
# ghcr.io/ctfd/ctfd:${{ github.event.release.tag_name }}
-
name: Build and push
uses: docker/build-push-action@v2
@@ -55,5 +38,7 @@ jobs:
platforms: linux/amd64
push: true
tags: |
ctfd/ctfd:test-github-action
ghcr.io/ctfd/ctfd:test-github-action
ctfd/ctfd:latest
ghcr.io/ctfd/ctfd:latest
ctfd/ctfd:${{ github.event.release.tag_name }}
ghcr.io/ctfd/ctfd:${{ github.event.release.tag_name }}