2023-03-30 14:54:45 +02:00
|
|
|
name: Dockerbuild
|
|
|
|
on:
|
|
|
|
workflow_dispatch: {}
|
|
|
|
push:
|
2024-05-15 00:13:03 +02:00
|
|
|
branches: [master, staging, develop]
|
2023-03-30 14:54:45 +02:00
|
|
|
paths:
|
|
|
|
- "dockerbuild/**"
|
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
|
|
|
|
env:
|
|
|
|
REGISTRY: ghcr.io
|
|
|
|
IMAGE_NAME: ${{ github.repository }}-dockerbuild
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Docker Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
2024-01-02 18:24:45 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-30 14:54:45 +02:00
|
|
|
|
2024-05-15 00:13:03 +02:00
|
|
|
- name: Set up QEMU
|
2024-07-24 14:15:01 +02:00
|
|
|
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
|
2024-05-15 00:13:03 +02:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2024-08-22 17:42:08 +02:00
|
|
|
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
|
2024-05-15 00:13:03 +02:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
2023-03-30 14:54:45 +02:00
|
|
|
- name: Log in to the Container registry
|
2024-07-24 14:15:01 +02:00
|
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
2023-03-30 14:54:45 +02:00
|
|
|
with:
|
|
|
|
registry: ${{ env.REGISTRY }}
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker
|
|
|
|
id: meta
|
2024-02-22 10:03:17 +01:00
|
|
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
|
2023-03-30 14:54:45 +02:00
|
|
|
with:
|
|
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
|
|
|
|
- name: Build and push Docker image
|
2024-08-22 17:42:08 +02:00
|
|
|
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6
|
2023-03-30 14:54:45 +02:00
|
|
|
with:
|
|
|
|
context: dockerbuild
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2024-05-15 00:13:03 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|