From 5ec4d31e9142e748ceac866189578a7b1e0c92f8 Mon Sep 17 00:00:00 2001 From: V1ck3s Date: Sat, 13 Dec 2025 18:28:08 +0100 Subject: [PATCH] ci: trigger on manual dispatch, tags, and merged PRs --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e51461c..41be9cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,12 @@ name: CI/CD on: + workflow_dispatch: push: - branches: [main, dev] + tags: ['v*'] pull_request: - branches: [main, dev] + types: [closed] + branches: [master] env: DOTNET_VERSION: "9.0.x" @@ -14,6 +16,10 @@ env: jobs: build-and-test: runs-on: ubuntu-latest + if: | + github.event_name == 'workflow_dispatch' || + github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.pull_request.merged == true) steps: - name: Checkout @@ -36,7 +42,6 @@ jobs: docker: needs: build-and-test runs-on: ubuntu-latest - if: github.event_name == 'push' permissions: contents: read @@ -64,7 +69,7 @@ jobs: tags: | type=ref,event=branch type=sha,prefix= - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} - name: Build and push uses: docker/build-push-action@v6