Skip to content

Commit 8a116d5

Browse files
committed
Make workflows use our commit SHA-pinned actions
1 parent cbc4143 commit 8a116d5

File tree

8 files changed

+36
-76
lines changed

8 files changed

+36
-76
lines changed

.github/workflows/alpine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
packages: write
2424

2525
steps:
26-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
- uses: ./.github/actions/checkout
2727

2828
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
2929
with:

.github/workflows/build.yml

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
# This job won't actually run, it just defines reusable anchors
15-
_common:
16-
if: false # prevents execution
17-
runs-on: ubuntu-latest
18-
steps:
19-
- &checkout
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21-
- &cache
22-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
23-
- &cache-restore
24-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
25-
- &upload-artifact
26-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
27-
- &download-artifact
28-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
29-
- &sentry-github-workflow
30-
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
31-
3214
build-sentry-native:
3315
name: sentry-native (${{ matrix.rid }})
3416
runs-on: ${{ matrix.os }}
@@ -66,7 +48,7 @@ jobs:
6648
curl -sSL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/.github/alpine/setup-node.sh | sudo bash /dev/stdin
6749
6850
- name: Checkout
69-
<<: *checkout
51+
uses: ./.github/actions/checkout
7052

7153
- run: git submodule update --init modules/sentry-native
7254

@@ -76,7 +58,7 @@ jobs:
7658
uses: ./.github/actions/install-zstd
7759

7860
- id: cache
79-
<<: *cache
61+
uses: ./.github/actions/cache
8062
with:
8163
path: src/Sentry/Platforms/Native/sentry-native
8264
key: sentry-native-${{ matrix.rid }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
@@ -142,8 +124,8 @@ jobs:
142124
if: github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')
143125
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
144126

145-
- <<: *checkout
146-
name: Checkout
127+
- name: Checkout
128+
uses: ./.github/actions/checkout
147129
with:
148130
submodules: recursive
149131
fetch-depth: 2 # default is 1 and codecov needs > 1
@@ -162,47 +144,47 @@ jobs:
162144

163145
- name: Download sentry-native (linux-x64)
164146
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux-x64') }}
165-
<<: *cache-restore
147+
uses: ./.github/actions/cache-restore
166148
with:
167149
path: src/Sentry/Platforms/Native/sentry-native
168150
key: sentry-native-linux-x64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
169151
fail-on-cache-miss: true
170152

171153
- name: Download sentry-native (linux-arm64)
172154
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux-arm64') }}
173-
<<: *cache-restore
155+
uses: ./.github/actions/cache-restore
174156
with:
175157
path: src/Sentry/Platforms/Native/sentry-native
176158
key: sentry-native-linux-arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
177159
fail-on-cache-miss: true
178160

179161
- name: Download sentry-native (linux-musl-x64)
180162
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux-musl-x64') }}
181-
<<: *cache-restore
163+
uses: ./.github/actions/cache-restore
182164
with:
183165
path: src/Sentry/Platforms/Native/sentry-native
184166
key: sentry-native-linux-musl-x64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
185167
fail-on-cache-miss: true
186168

187169
- name: Download sentry-native (linux-musl-arm64)
188170
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux-musl-arm64') }}
189-
<<: *cache-restore
171+
uses: ./.github/actions/cache-restore
190172
with:
191173
path: src/Sentry/Platforms/Native/sentry-native
192174
key: sentry-native-linux-musl-arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
193175
fail-on-cache-miss: true
194176

195177
- name: Download sentry-native (macos)
196178
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'macos') }}
197-
<<: *cache-restore
179+
uses: ./.github/actions/cache-restore
198180
with:
199181
path: src/Sentry/Platforms/Native/sentry-native
200182
key: sentry-native-macos-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
201183
fail-on-cache-miss: true
202184

203185
- name: Download sentry-native (win-x64)
204186
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'win-x64') }}
205-
<<: *cache-restore
187+
uses: ./.github/actions/cache-restore
206188
with:
207189
path: src/Sentry/Platforms/Native/sentry-native
208190
key: sentry-native-win-x64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
@@ -211,7 +193,7 @@ jobs:
211193

212194
- name: Download sentry-native (win-arm64)
213195
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'win-arm64') }}
214-
<<: *cache-restore
196+
uses: ./.github/actions/cache-restore
215197
with:
216198
path: src/Sentry/Platforms/Native/sentry-native
217199
key: sentry-native-win-arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
@@ -231,7 +213,7 @@ jobs:
231213

232214
- name: Upload build logs
233215
if: ${{ always() }}
234-
<<: *upload-artifact
216+
uses: ./.github/actions/upload-artifact
235217
with:
236218
name: ${{ matrix.rid }}-build-logs
237219
path: |
@@ -249,7 +231,7 @@ jobs:
249231

250232
- name: Upload build and test outputs
251233
if: failure()
252-
<<: *upload-artifact
234+
uses: ./.github/actions/upload-artifact
253235
with:
254236
name: ${{ matrix.rid }}-verify-test-results
255237
path: "**/*.received.*"
@@ -259,7 +241,7 @@ jobs:
259241

260242
- name: Archive NuGet Packages
261243
if: env.CI_PUBLISHING_BUILD == 'true'
262-
<<: *upload-artifact
244+
uses: ./.github/actions/upload-artifact
263245
with:
264246
name: ${{ github.sha }}
265247
if-no-files-found: error
@@ -279,13 +261,13 @@ jobs:
279261
280262
- name: Fetch NuGet Packages
281263
if: env.CI_PUBLISHING_BUILD == 'true'
282-
<<: *download-artifact
264+
uses: ./.github/actions/download-artifact
283265
with:
284266
name: ${{ github.sha }}
285267
path: src
286268

287269
- name: Integration test
288-
<<: *sentry-github-workflow
270+
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7
289271
with:
290272
path: integration-test
291273

@@ -296,12 +278,12 @@ jobs:
296278

297279
steps:
298280
- name: Checkout
299-
<<: *checkout
281+
uses: ./.github/actions/checkout
300282
with:
301283
submodules: recursive
302284

303285
- name: Download sentry-native (win-x64)
304-
<<: *cache-restore
286+
uses: ./.github/actions/cache-restore
305287
with:
306288
path: src/Sentry/Platforms/Native/sentry-native
307289
key: sentry-native-win-x64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
@@ -323,7 +305,7 @@ jobs:
323305

324306
- name: Upload logs
325307
if: ${{ always() }}
326-
<<: *upload-artifact
308+
uses: ./.github/actions/upload-artifact
327309
with:
328310
name: ${{ runner.os }}-msbuild-logs
329311
path: |
@@ -349,7 +331,7 @@ jobs:
349331

350332
steps:
351333
- name: Checkout
352-
<<: *checkout
334+
uses: ./.github/actions/checkout
353335
with:
354336
submodules: recursive
355337

@@ -360,13 +342,13 @@ jobs:
360342
uses: ./.github/actions/buildnative
361343

362344
- name: Fetch NuGet Packages
363-
<<: *download-artifact
345+
uses: ./.github/actions/download-artifact
364346
with:
365347
name: ${{ github.sha }}
366348
path: src
367349

368350
- name: Test AOT
369-
<<: *sentry-github-workflow
351+
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7
370352
env:
371353
RuntimeIdentifier: ${{ matrix.rid }}
372354
with:
@@ -379,7 +361,7 @@ jobs:
379361

380362
steps:
381363
- name: Checkout
382-
<<: *checkout
364+
uses: ./.github/actions/checkout
383365
with:
384366
submodules: recursive
385367
fetch-depth: 2 # default is 1 and codecov needs > 1
@@ -389,7 +371,7 @@ jobs:
389371
run: echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
390372

391373
- name: Download sentry-native (macos)
392-
<<: *cache-restore
374+
uses: ./.github/actions/cache-restore
393375
with:
394376
path: src/Sentry/Platforms/Native/sentry-native
395377
key: sentry-native-macos-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
2828

2929
- name: Checkout repository
30-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
uses: ./.github/actions/checkout
3131
with:
3232
submodules: recursive
3333

.github/workflows/device-tests-android.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
# This job won't actually run, it just defines reusable anchors
15-
_common:
16-
if: false # prevents execution
17-
runs-on: ubuntu-latest
18-
steps:
19-
- &checkout
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21-
- &upload-artifact
22-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
23-
- &download-artifact
24-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
25-
2614
build:
2715
name: Build (${{ matrix.tfm }})
2816
runs-on: ubuntu-latest
@@ -39,7 +27,7 @@ jobs:
3927
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
4028

4129
- name: Checkout
42-
<<: *checkout
30+
uses: ./.github/actions/checkout
4331
with:
4432
submodules: recursive
4533

@@ -54,7 +42,7 @@ jobs:
5442

5543
- name: Upload Android Test App (net9.0)
5644
if: matrix.tfm == 'net9.0'
57-
<<: *upload-artifact
45+
uses: ./.github/actions/upload-artifact
5846
with:
5947
name: device-test-android-net9.0
6048
if-no-files-found: error
@@ -92,10 +80,10 @@ jobs:
9280
sudo udevadm trigger --name-match=kvm
9381
9482
- name: Checkout
95-
<<: *checkout
83+
uses: ./.github/actions/checkout
9684

9785
- name: Download test app artifact
98-
<<: *download-artifact
86+
uses: ./.github/actions/download-artifact
9987
with:
10088
name: device-test-android-${{ matrix.tfm }}
10189
path: bin
@@ -138,7 +126,7 @@ jobs:
138126

139127
- name: Upload results
140128
if: success() || failure()
141-
<<: *upload-artifact
129+
uses: ./.github/actions/upload-artifact
142130
with:
143131
name: device-test-android-${{ matrix.api-level }}-${{ matrix.tfm }}-results
144132
path: test_output

.github/workflows/device-tests-ios.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
# This job won't actually run, it just defines reusable anchors
15-
_common:
16-
if: false # prevents execution
17-
runs-on: ubuntu-latest
18-
steps:
19-
- &checkout
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21-
- &upload-artifact
22-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
23-
2414
ios-tests:
2515
runs-on: macos-15
2616
env:
@@ -34,7 +24,7 @@ jobs:
3424
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
3525

3626
- name: Checkout
37-
<<: *checkout
27+
uses: ./.github/actions/checkout
3828
with:
3929
submodules: recursive
4030

@@ -55,7 +45,7 @@ jobs:
5545

5646
- name: Upload results
5747
if: success() || failure()
58-
<<: *upload-artifact
48+
uses: ./.github/actions/upload-artifact
5949
with:
6050
name: device-test-ios-results
6151
path: test_output

.github/workflows/format-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: macos-15
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
uses: ./.github/actions/checkout
1919
with:
2020
submodules: recursive
2121

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2626
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2727
- name: Check out current commit (${{ github.sha }})
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: ./.github/actions/checkout
2929
with:
3030
token: ${{ steps.token.outputs.token }}
3131
fetch-depth: 0

.github/workflows/vulnerabilities.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
uses: ./.github/actions/checkout
1919
with:
2020
submodules: recursive
2121

0 commit comments

Comments
 (0)