Skip to content

Merge pull request #1 from halkeye/docker-actions #1

Merge pull request #1 from halkeye/docker-actions

Merge pull request #1 from halkeye/docker-actions #1

Workflow file for this run

name: docker-build-push
on:
workflow_dispatch:
push:
branches:
- 'develop'
release:
types:
- published
pull_request:
branches:
- 'develop'
jobs:
docker-build-push:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: "ghcr.io/${{ github.repository }}"
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}