Files
CTFd/.github/workflows/docker-build.yml
Kevin Chung 3cbe463dae Change Github Action to run on release (#2028)
* Change Docker image release script to run on release
2021-11-22 21:11:00 -05:00

45 lines
1.1 KiB
YAML

name: Docker build image on release
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
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 }}