Build only when label is applied
This commit is contained in:
parent
66317827ea
commit
49afb020c1
14
.github/workflows/release-prs.yml
vendored
14
.github/workflows/release-prs.yml
vendored
|
@ -10,13 +10,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: ./.github/workflows/build.yaml
|
# We want to build artifacts only if the `upload to s3` label is applied
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
concurrency: release
|
|
||||||
# Only intra-repo PRs are allowed to have PR artifacts uploaded
|
# Only intra-repo PRs are allowed to have PR artifacts uploaded
|
||||||
# We only want to trigger once the upload once in the case the upload label is added, not when any label is added
|
# We only want to trigger once the upload once in the case the upload label is added, not when any label is added
|
||||||
if: |
|
if: |
|
||||||
|
@ -25,6 +19,12 @@ jobs:
|
||||||
(github.event.action == 'labeled' && github.event.label.name == 'upload to s3')
|
(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'))
|
|| (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'upload to s3'))
|
||||||
)
|
)
|
||||||
|
uses: ./.github/workflows/build.yaml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
concurrency: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # In order to request a JWT for AWS auth
|
id-token: write # In order to request a JWT for AWS auth
|
||||||
|
|
Loading…
Reference in a new issue