limit to certain paths for PRs & naming

This commit is contained in:
tooomm 2025-04-13 18:17:33 +02:00 committed by GitHub
parent 43a936db07
commit 0e0a51a9db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,30 +1,45 @@
name: build & push docker container
name: Build Docker Container
on:
push:
tags:
- '*Release*'
branches:
- master
pull_request:
branches:
- master
paths:
- '.github/workflows/docker-release.yml'
- 'servatrice/**'
- 'common/**'
- '!**.md'
jobs:
docker:
name: amd64 & arm64
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
- name: Docker meta data
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/cockatrice/servatrice
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
@ -32,7 +47,8 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push
- name: Build and push Docker Image
uses: docker/build-push-action@v6
with:
context: .