mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Update Docker Image CI/CD (#2183)
* Update docker-build.yml to provide ARM builds
This commit is contained in:
50
.github/workflows/docker-build.yml
vendored
50
.github/workflows/docker-build.yml
vendored
@@ -7,38 +7,40 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
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
|
||||
- name: Set repo name lowercase
|
||||
id: repo
|
||||
uses: ASzc/change-string-case-action@v2
|
||||
with:
|
||||
string: ${{ github.repository }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
platforms: linux/amd64,linux/arm64
|
||||
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 }}
|
||||
${{ steps.repo.outputs.lowercase }}:latest
|
||||
ghcr.io/${{ steps.repo.outputs.lowercase }}:latest
|
||||
${{ steps.repo.outputs.lowercase }}:${{ github.event.release.tag_name }}
|
||||
ghcr.io/${{ steps.repo.outputs.lowercase }}:${{ github.event.release.tag_name }}
|
||||
|
||||
Reference in New Issue
Block a user