From c7b231c99febe14ae84f8265bf2cd82232cf1f38 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 31 Mar 2026 21:59:46 +0200 Subject: [PATCH] Improve CI triggers --- .github/workflows/docker-publish.yml | 14 ++++++++++---- .../workflows/{python-app.yml => python-lint.yml} | 8 ++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) rename .github/workflows/{python-app.yml => python-lint.yml} (89%) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d566abd..e8d8e2b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,11 +1,17 @@ +# This workflow will build and publish Docker images of smahub for each push of a tag starting with "v" + +--- +# .github/workflows/docker-publish.yml name: Build and publish Docker image on: push: - branches: [ "main" ] - tags: [ 'v*.*.*' ] - pull_request: - branches: [ "main" ] + tags: + - v* + +concurrency: + group: "publish-${{ github.head_ref || github.ref }}" + cancel-in-progress: true env: REGISTRY: ghcr.io diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-lint.yml similarity index 89% rename from .github/workflows/python-app.yml rename to .github/workflows/python-lint.yml index ce06db1..1414d56 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-lint.yml @@ -1,6 +1,8 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +--- +# .github/workflows/python-lint.yml name: Run Python linter and tests on: @@ -9,14 +11,16 @@ on: pull_request: branches: [ "main" ] +concurrency: + group: "lint-${{ github.head_ref || github.ref }}" + cancel-in-progress: true + permissions: contents: read jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Set up Python 3.10