Cancel superseded pull request validation without cancelling releases

This commit is contained in:
2026-09-11 08:47:07 +00:00
parent 20c1efb8a3
commit 8502885a9d
+14 -7
View File
@@ -3,19 +3,26 @@ name: Build and Push Container
on: on:
push: push:
branches: branches:
- master - main
- main
tags: tags:
- v* - v*
workflow_dispatch: workflow_dispatch: null
pull_request:
branches:
- main
env: env:
REGISTRY: gitea.wayfinderak.com REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: wayfinderak/prepbot IMAGE_NAME: wayfinderak/prepbot
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number
|| github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: butler-ci
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -39,7 +46,7 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to Gitea registry - name: Log in to Gitea registry
if: ${{ steps.delivery.outputs.run == 'true' }} if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
@@ -74,6 +81,6 @@ jobs:
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: ${{ steps.prep.outputs.tags }} tags: ${{ steps.prep.outputs.tags }}