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
|
2024-11-22 11:18:33 +01:00
|
|
|
permissions: {}
|
2023-03-30 14:54:45 +02:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Docker Build
|
2024-10-17 10:46:02 +02:00
|
|
|
runs-on: ubuntu-24.04
|
2023-03-30 14:54:45 +02:00
|
|
|
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
|
2025-01-07 18:25:58 +01:00
|
|
|
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # 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-11-12 19:17:35 +01:00
|
|
|
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0
|
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-11-26 18:05:46 +01:00
|
|
|
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # 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-11-26 18:05:46 +01:00
|
|
|
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # 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
|