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:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Set repo name lowercase
|
||||||
name: Checkout
|
id: repo
|
||||||
uses: actions/checkout@v2
|
uses: ASzc/change-string-case-action@v2
|
||||||
-
|
with:
|
||||||
name: Set up QEMU
|
string: ${{ github.repository }}
|
||||||
uses: docker/setup-qemu-action@v1
|
- name: Checkout
|
||||||
-
|
uses: actions/checkout@v3
|
||||||
name: Set up Docker Buildx
|
- name: Set up QEMU
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
-
|
- name: Set up Docker Buildx
|
||||||
name: Login to DockerHub
|
uses: docker/setup-buildx-action@v2
|
||||||
uses: docker/login-action@v1
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
- name: Login to GitHub Container Registry
|
||||||
name: Login to GitHub Container Registry
|
uses: docker/login-action@v2
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
- name: Build and push
|
||||||
name: Build and push
|
uses: docker/build-push-action@v3
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ctfd/ctfd:latest
|
${{ steps.repo.outputs.lowercase }}:latest
|
||||||
ghcr.io/ctfd/ctfd:latest
|
ghcr.io/${{ steps.repo.outputs.lowercase }}:latest
|
||||||
ctfd/ctfd:${{ github.event.release.tag_name }}
|
${{ steps.repo.outputs.lowercase }}:${{ github.event.release.tag_name }}
|
||||||
ghcr.io/ctfd/ctfd:${{ github.event.release.tag_name }}
|
ghcr.io/${{ steps.repo.outputs.lowercase }}:${{ github.event.release.tag_name }}
|
||||||
|
|||||||
Reference in New Issue
Block a user