From bbaeca10a8aad2a01afc3f253d48c9e704240eab Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 22 May 2023 16:06:24 -0400 Subject: [PATCH] Update .github/workflows/release-prs.yml --- .github/workflows/release-prs.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index 1d5a231..f17205d 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -17,7 +17,13 @@ jobs: concurrency: release # Only intra-repo PRs are allowed to have PR artifacts uploaded - if: github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-actions-cache' && contains(github.event.pull_request.labels.*.name, 'upload to s3') + # We only want to trigger once the upload once in the case the upload label is added, not when any label is added + if: | + github.event.pull_request.head.repo.full_name == 'DeterminateSystems/nix-actions-cache' + && ( + (github.event.action == 'labeled' && github.event.label.name == 'upload to s3') + || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3')) + ) runs-on: ubuntu-latest permissions: id-token: write # In order to request a JWT for AWS auth