[ci] Pin 3rd party actions to specific hash (#7690)

* [ci] Fix permissions and don't use pull_request_target

Defaults permissions to none for all workflows, and only request extra permissions when needed.

Similar to https://github.com/facebook/react/pull/32708, prefer the less permissive `pull_request` trigger instead.

* [ci] Pin 3rd party actions to specific hash
This commit is contained in:
lauren
2025-03-21 16:32:50 -04:00
committed by GitHub
parent 982b16d60e
commit f6d762cbbf
2 changed files with 4 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ jobs:
name: bundle_analysis.json
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
if: success() && github.event.number
with:
workflow: analyze.yml

View File

@@ -16,7 +16,7 @@ jobs:
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -24,7 +24,7 @@ jobs:
path: analysis_comment.txt
- name: Download PR number
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -50,7 +50,7 @@ jobs:
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
- name: Comment
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
with:
header: next-bundle-analysis
number: ${{ steps.get-comment-body.outputs.pr-number }}