From 9d65d7a391e1ebd4d7b7a844ff43639a35f40198 Mon Sep 17 00:00:00 2001 From: Dan Kluser Date: Thu, 14 May 2026 12:56:50 +0200 Subject: [PATCH] manual trigger for PRs --- .github/workflows/build-image.yml | 3 +++ .github/workflows/trigger-builds.yml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index d5887c5..72bee6d 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -94,6 +94,7 @@ jobs: > image/output/ps5-${{ matrix.distro }}.img.xz - name: Upload to R2 + if: github.event_name != 'pull_request' env: RCLONE_CONFIG_R2_TYPE: s3 RCLONE_CONFIG_R2_PROVIDER: Cloudflare @@ -122,6 +123,7 @@ jobs: retention-days: 1 - name: Upload to remote + if: github.event_name != 'pull_request' env: SSH_KEY: ${{ secrets.REMOTE_SSH_KEY }} SSH_CONFIG: ${{ secrets.REMOTE_SSH_CONFIG }} @@ -144,6 +146,7 @@ jobs: release: needs: build runs-on: self-hosted + if: github.event_name != 'pull_request' permissions: contents: write steps: diff --git a/.github/workflows/trigger-builds.yml b/.github/workflows/trigger-builds.yml index 27cf704..bb9bd14 100644 --- a/.github/workflows/trigger-builds.yml +++ b/.github/workflows/trigger-builds.yml @@ -4,9 +4,17 @@ on: workflow_dispatch: push: branches: [main] + pull_request_target: + types: [labeled] + branches: [main] jobs: image: + # Only run on push, manual dispatch, OR when the 'run-ci' label is added to a PR + if: | + github.event_name == 'workflow_dispatch' || + github.event_name == 'push' || + (github.event_name == 'pull_request_target' && github.event.label.name == 'run-ci') permissions: contents: write uses: ./.github/workflows/build-image.yml