Skip to content

Commit c5d98a4

Browse files
authored
Merge pull request #91465 from Expensify/chore/getblacksmith-checkout-v1
[No QA] chore: use useblacksmith/checkout v1 in workflows
2 parents da2899f + ce974e4 commit c5d98a4

50 files changed

Lines changed: 70 additions & 122 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Due to the large, ever-growing history of this repo, do not do any full-fetches
4242

4343
```yaml
4444
# Bad
45-
- uses: actions/checkout@v4
45+
- uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
4646
with:
4747
fetch-depth: 0
4848
4949
# Good
50-
- uses: actions/checkout@v4
50+
- uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
5151
```
5252

5353
```sh
@@ -63,7 +63,7 @@ git fetch origin tag 1.0.1-0 --no-tags --shallow-exclude=1.0.0-0 # This will fet
6363

6464
## Security Rules 🔐
6565
1. Do **not** use `pull_request_target` trigger unless an external fork needs access to secrets, or a _write_ `GITHUB_TOKEN`.
66-
1. Do **not ever** write a `pull_request_target` trigger with an explicit PR checkout, e.g. using `actions/checkout@v4`. This is [discussed further here](https://securitylab.github.com/research/github-actions-preventing-pwn-requests)
66+
1. Do **not ever** write a `pull_request_target` trigger with an explicit PR checkout, e.g. using `useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121`. This is [discussed further here](https://securitylab.github.com/research/github-actions-preventing-pwn-requests)
6767
1. **Do use** the `pull_request` trigger as it does not send internal secrets and only grants a _read_ `GITHUB_TOKEN`.
6868
1. If an untrusted (i.e: not maintained by GitHub) external action needs access to any secret (`GITHUB_TOKEN` or internal secret), use the commit hash of the workflow to prevent a modification of underlying source code at that version. For example:
6969
1. **Bad:** `hmarr/auto-approve-action@v2.0.0` Relies on the tag
@@ -138,7 +138,7 @@ In order to bundle actions with their dependencies into a single Node.js executa
138138
### Important tips about creating GitHub Actions
139139

140140
- When calling your GitHub Action from one of our workflows, you must:
141-
- First call `@actions/checkout`.
141+
- First call `useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121` (`# v1`).
142142
- Use the relative path of the action in GitHub from the root of this repo, like so:
143143
```yaml
144144
- name: Generate Version

.github/workflows/androidBump.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
android_bump:
1111
runs-on: blacksmith-2vcpu-ubuntu-2404
1212
steps:
13-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
13+
- uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
1414

1515
- name: Setup Node
1616
uses: ./.github/actions/composite/setupNode

.github/workflows/authorChecklist.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
&& github.actor != 'imgbot[bot]'
2828
steps:
2929
- name: Checkout
30-
# v6
31-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
30+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
3231

3332
- name: authorChecklist.ts
3433
uses: ./.github/actions/javascript/authorChecklist

.github/workflows/buildAdHoc.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ jobs:
140140
needs: [buildWeb, deployWebAdHoc, buildAndroid, buildIOS]
141141
steps:
142142
- name: Checkout
143-
# v6
144-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
143+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
145144
with:
146145
ref: ${{ inputs.APP_REF }}
147146

@@ -181,8 +180,7 @@ jobs:
181180
needs: [buildWeb, deployWebAdHoc, buildAndroid, buildIOS]
182181
steps:
183182
- name: Checkout
184-
# v6
185-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
183+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
186184
with:
187185
ref: ${{ inputs.APP_REF }}
188186

.github/workflows/buildAndroid.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ jobs:
6767
PROGUARD_MAPPING_FILENAME: mapping.txt
6868
steps:
6969
- name: Checkout
70-
# v6
71-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
70+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
7271
with:
7372
submodules: true
7473
ref: ${{ inputs.ref }}

.github/workflows/buildIOS.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ jobs:
6464
SOURCEMAP_FILENAME: main.jsbundle.map
6565
steps:
6666
- name: Checkout
67-
# v6
68-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
67+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
6968
with:
7069
submodules: true
7170
ref: ${{ inputs.ref }}

.github/workflows/buildWeb.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ jobs:
3939
PULL_REQUEST_NUMBER: ${{ inputs.pull-request-number }}
4040
steps:
4141
- name: Checkout
42-
# v6
43-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
42+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
4443
with:
4544
ref: ${{ inputs.ref }}
4645

.github/workflows/checkSVGCompression.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
runs-on: blacksmith-2vcpu-ubuntu-2404
2222
steps:
2323
- name: Checkout
24-
# v6
25-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
24+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
2625

2726
- name: Setup Node
2827
uses: ./.github/actions/composite/setupNode

.github/workflows/cherryPick.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@ jobs:
100100
id: getBranchName
101101
run: echo "CONFLICT_BRANCH_NAME=cherry-pick-${{ inputs.TARGET }}-${{ steps.getPRInfo.outputs.PR_NUMBER }}-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
102102

103-
# v4
104103
- name: Checkout target branch
105-
# v6
106-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
104+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
107105
with:
108106
ref: ${{ inputs.TARGET }}
109107
token: ${{ secrets.OS_BOTIFY_TOKEN }}

.github/workflows/claude-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
IS_CPLUS: ${{ steps.check.outputs.IS_CPLUS }}
3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
33+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
3434
with:
3535
fetch-depth: 1
3636

@@ -56,7 +56,7 @@ jobs:
5656
PR_NUMBER: ${{ github.event.pull_request.number }}
5757
steps:
5858
- name: Checkout repository
59-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
59+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
6060
with:
6161
fetch-depth: 1
6262

0 commit comments

Comments
 (0)