Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[TT-16977] fix: trigger release workflow on PR labeled event #8089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
[TT-16977] fix: trigger release workflow on PR labeled event #8089
Changes from all commits
b1aa499File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning on line 19 in .github/workflows/release.yml
security Issue
Raw output
To mitigate this risk, use the `pull_request_target` event instead of `pull_request` for workflows that need to run on events like labeling. `pull_request_target` runs in the context of the base repository with access to secrets, but it checks out the base branch, not the potentially malicious head of the pull request. If you need to evaluate the PR's code, ensure you check out the PR's head commit in a secure way, for example by using `actions/checkout` with the `ref` set to `refs/pull/${{ github.event.pull_request.number }}/merge`. Additionally, add a condition to the job to only run when the specific, expected label (e.g., 'deps-reviewed') is added, to avoid running on any label change.Check warning on line 19 in .github/workflows/release.yml
architecture Issue
Raw output
To align with the intended behavior, add a condition to the relevant job(s) in this workflow to check for the specific label when the event type is `labeled`. This will prevent the workflow from running for irrelevant label changes. For example, you can add an `if` condition to your job(s): ```yaml jobs: your-job-name: if: github.event_name != 'pull_request' || github.event.action != 'labeled' || github.event.label.name == 'deps-reviewed' runs-on: ubuntu-latest steps: ... ``` This condition ensures the job runs for all triggers other than a `pull_request` `labeled` event, and for `labeled` events, it only runs if the label name is `deps-reviewed`.Check warning on line 19 in .github/workflows/release.yml
performance Issue
Raw output
Check warning on line 19 in .github/workflows/release.yml
performance Issue
Raw output
Uh oh!
There was an error while loading. Please reload this page.