Skip to content

Commit 3bee6d1

Browse files
chore(ci): pin all GitHub Action refs to commit SHAs (API-475) (#6819)
1 parent b5880f1 commit 3bee6d1

43 files changed

Lines changed: 101 additions & 98 deletions

File tree

Some content is hidden

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

โ€Ž.github/actions/setup/action.ymlโ€Ž

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ runs:
1919
# Java for code generation
2020
- name: Install Java
2121
if: inputs.type != 'minimal'
22-
uses: actions/setup-java@v5
22+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
2323
with:
2424
distribution: zulu
2525
java-version-file: config/.java-version
2626

2727
- name: Setup gradle
2828
if: inputs.type != 'minimal'
29-
uses: gradle/actions/setup-gradle@v6.2.0
29+
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
3030
with:
3131
validate-wrappers: true
3232
cache-provider: basic
@@ -39,7 +39,7 @@ runs:
3939

4040
# JavaScript for monorepo and tooling
4141
- name: Install Node
42-
uses: actions/setup-node@v6
42+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
4343
with:
4444
node-version-file: .nvmrc
4545
cache: yarn
@@ -51,14 +51,14 @@ runs:
5151
# Csharp
5252
- name: Install dotnet
5353
if: ${{ inputs.language == 'csharp' }}
54-
uses: actions/setup-dotnet@v5
54+
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
5555
with:
5656
dotnet-version: ${{ inputs.version }}
5757

5858
# Dart
5959
- name: Install dart
6060
if: ${{ inputs.language == 'dart' }}
61-
uses: dart-lang/setup-dart@v1
61+
uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2
6262
with:
6363
sdk: ${{ inputs.version }}
6464

@@ -70,7 +70,7 @@ runs:
7070
# Golang
7171
- name: Install golang
7272
if: ${{ inputs.language == 'go' }}
73-
uses: actions/setup-go@v6
73+
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
7474
with:
7575
cache-dependency-path: clients/algoliasearch-client-go/go.sum
7676
go-version: ${{ inputs.version }}
@@ -85,7 +85,7 @@ runs:
8585
8686
- name: Cache golangci-lint analysis
8787
if: ${{ inputs.language == 'go' }}
88-
uses: actions/cache@v6
88+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
8989
with:
9090
path: ~/.cache/golangci-lint
9191
key: golangci-lint-${{ inputs.version }}-${{ hashFiles('clients/algoliasearch-client-go/go.sum') }}
@@ -99,14 +99,14 @@ runs:
9999

100100
- name: Restore Yarn js-client
101101
if: ${{ inputs.language == 'javascript' }}
102-
uses: actions/cache@v6
102+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
103103
with:
104104
path: ${{ steps.yarn-cache-dir-client.outputs.dir || 'clients/algoliasearch-client-javascript/.yarn/cache' }}
105105
key: yarn-cache-clients-${{ hashFiles('clients/algoliasearch-client-javascript/yarn.lock') }}
106106

107107
- name: Cache js-client node modules
108108
if: ${{ inputs.language == 'javascript' }}
109-
uses: actions/cache@v6
109+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
110110
with:
111111
path: clients/algoliasearch-client-javascript/node_modules
112112
key: node-modules-clients-${{ hashFiles('clients/algoliasearch-client-javascript/yarn.lock') }}
@@ -119,7 +119,7 @@ runs:
119119
# PHP
120120
- name: Install PHP
121121
if: ${{ inputs.language == 'php' }}
122-
uses: shivammathur/setup-php@v2
122+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
123123
with:
124124
php-version: ${{ inputs.version }}
125125
tools: composer
@@ -137,7 +137,7 @@ runs:
137137
shell: bash
138138
run: pipx install poetry==2
139139

140-
- uses: actions/setup-python@v6
140+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
141141
if: ${{ inputs.language == 'python' }}
142142
with:
143143
python-version: ${{ inputs.version }}
@@ -151,7 +151,7 @@ runs:
151151
# Ruby
152152
- name: Install Ruby
153153
if: ${{ inputs.language == 'ruby' }}
154-
uses: ruby/setup-ruby@v1
154+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
155155
with:
156156
ruby-version: ${{ inputs.version }}
157157
bundler-cache: true
@@ -168,7 +168,7 @@ runs:
168168
# Scala
169169
- name: Install sbt
170170
if: ${{ inputs.language == 'scala' }}
171-
uses: sbt/setup-sbt@v1
171+
uses: sbt/setup-sbt@bfea3c5f48abd221b04a6df4798aa5eb8b6a2baf # v1.5.6
172172

173173
# Swift deps
174174
- name: Install swift
@@ -184,7 +184,7 @@ runs:
184184
- name: Cache the build folder
185185
id: cache-swift-build
186186
if: ${{ inputs.language == 'swift' }}
187-
uses: actions/cache@v6
187+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
188188
with:
189189
path: |
190190
clients/algoliasearch-client-swift/.build
@@ -198,7 +198,7 @@ runs:
198198

199199
- name: Checkout swiftformat
200200
if: ${{ inputs.language == 'swift' }}
201-
uses: actions/checkout@v7
201+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
202202
with:
203203
repository: nicklockwood/SwiftFormat
204204
ref: ${{ steps.swiftformat-version.outputs.SWIFTFORMAT_VERSION }}
@@ -207,7 +207,7 @@ runs:
207207
- name: Cache the build folder for swiftformat
208208
id: cache-swiftformat
209209
if: ${{ inputs.language == 'swift' }}
210-
uses: actions/cache@v6
210+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
211211
with:
212212
path: swiftformat/.build
213213
key: swiftformat-build-${{ steps.swiftformat-version.outputs.SWIFTFORMAT_VERSION }}-${{ runner.os }}

โ€Ž.github/workflows/check.ymlโ€Ž

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
permissions:
2626
pull-requests: write
2727
steps:
28-
- uses: actions/checkout@v7
28+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929

3030
- name: Generate GitHub App Token
3131
id: app-token
@@ -34,7 +34,7 @@ jobs:
3434
client-id: ${{ vars.ALGOLIA_BOT_CLIENT_ID }}
3535
private-key: ${{ secrets.ALGOLIA_BOT_PRIVATE_KEY }}
3636

37-
- uses: marocchino/sticky-pull-request-comment@v3
37+
- uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
3838
with:
3939
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4040
message: |
@@ -55,7 +55,7 @@ jobs:
5555
GITHUB_CONTEXT: ${{ toJSON(github) }}
5656
run: echo "$GITHUB_CONTEXT"
5757

58-
- uses: actions/checkout@v7
58+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5959
with:
6060
fetch-depth: 0
6161

@@ -136,7 +136,7 @@ jobs:
136136
needs: setup
137137
if: ${{ needs.setup.outputs.RUN_SCRIPTS == 'true' }}
138138
steps:
139-
- uses: actions/checkout@v7
139+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
140140

141141
- name: Setup
142142
uses: ./.github/actions/setup
@@ -160,7 +160,7 @@ jobs:
160160
timeout-minutes: 10
161161
needs: setup
162162
steps:
163-
- uses: actions/checkout@v7
163+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
164164

165165
- name: Setup
166166
uses: ./.github/actions/setup
@@ -171,7 +171,7 @@ jobs:
171171
run: yarn cli build specs -s
172172

173173
- name: Store bundled specs
174-
uses: actions/upload-artifact@v7
174+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
175175
with:
176176
if-no-files-found: error
177177
name: specs
@@ -197,7 +197,7 @@ jobs:
197197
METIS_API_KEY: ${{ secrets.METIS_API_KEY }}
198198
name: client javascript${{ needs.setup.outputs.RUN_GEN_JAVASCRIPT == 'true' && format('@{0}', fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).version) || '' }}
199199
steps:
200-
- uses: actions/checkout@v7
200+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
201201

202202
- name: Download specs artifacts
203203
uses: ./scripts/ci/actions/restore-artifacts
@@ -253,13 +253,13 @@ jobs:
253253
run: echo "dir=$(cd tests/output/javascript && yarn config get cacheFolder)" >> $GITHUB_OUTPUT
254254

255255
- name: Restore Yarn js tests
256-
uses: actions/cache@v6
256+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
257257
with:
258258
path: ${{ steps.yarn-cache-dir-tests.outputs.dir || 'tests/output/javascript/.yarn/cache' }}
259259
key: yarn-cache-tests-${{ hashFiles('tests/output/javascript/yarn.lock') }}
260260

261261
- name: Cache js tests node modules
262-
uses: actions/cache@v6
262+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
263263
with:
264264
path: tests/output/javascript/node_modules
265265
key: node-modules-tests-${{ hashFiles('tests/output/javascript/yarn.lock') }}
@@ -296,7 +296,7 @@ jobs:
296296
run: zip -r -y clients-javascript.zip clients/algoliasearch-client-javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToStore }} ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).guidesToStore }} -x "**/node_modules**" "**/.yarn/cache/**" "**/.yarn/install-state.gz" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/.nx/**"
297297

298298
- name: Store javascript clients
299-
uses: actions/upload-artifact@v7
299+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
300300
with:
301301
if-no-files-found: error
302302
name: clients-javascript
@@ -327,7 +327,7 @@ jobs:
327327
hasBreakingChanges: ${{ steps.breakingChanges.outputs.hasBreakingChanges }}
328328
name: client ${{ matrix.client.language }}@${{ matrix.client.version }}
329329
steps:
330-
- uses: actions/checkout@v7
330+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
331331

332332
- name: Download specs artifacts
333333
uses: ./scripts/ci/actions/restore-artifacts
@@ -419,7 +419,7 @@ jobs:
419419

420420
- name: Store ${{ matrix.client.language }} clients
421421
if: ${{ matrix.client.isMainVersion }}
422-
uses: actions/upload-artifact@v7
422+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
423423
with:
424424
if-no-files-found: error
425425
name: clients-${{matrix.client.language }}
@@ -442,7 +442,7 @@ jobs:
442442
success: ${{ steps.setoutput.outputs.success }}
443443
name: client kotlin${{ format('@{0}', fromJSON(needs.setup.outputs.KOTLIN_DATA).version) }} macos
444444
steps:
445-
- uses: actions/checkout@v7
445+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
446446

447447
- name: Download specs artifacts
448448
uses: ./scripts/ci/actions/restore-artifacts
@@ -492,7 +492,7 @@ jobs:
492492
success: ${{ steps.setoutput.outputs.success }}
493493
name: client swift${{ format('@{0}', fromJSON(needs.setup.outputs.SWIFT_DATA).version) }} linux
494494
steps:
495-
- uses: actions/checkout@v7
495+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
496496
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
497497

498498
- name: Download specs artifacts
@@ -544,7 +544,7 @@ jobs:
544544
client-id: ${{ vars.ALGOLIA_BOT_CLIENT_ID }}
545545
private-key: ${{ secrets.ALGOLIA_BOT_PRIVATE_KEY }}
546546

547-
- uses: actions/checkout@v7
547+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
548548
with:
549549
fetch-depth: 0
550550
ref: ${{ github.event.pull_request.head.ref }}
@@ -608,7 +608,7 @@ jobs:
608608
} >> "$GITHUB_OUTPUT"
609609
610610
- name: update generation comment
611-
uses: marocchino/sticky-pull-request-comment@v3
611+
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
612612
if: ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT == '' }}
613613
with:
614614
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
@@ -621,7 +621,7 @@ jobs:
621621
${{ steps.benchmark.outputs.BENCHMARK_SECTION }}
622622
623623
- name: update generation comment
624-
uses: marocchino/sticky-pull-request-comment@v3
624+
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
625625
if: ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT != '' }}
626626
with:
627627
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
@@ -643,7 +643,7 @@ jobs:
643643

644644
- name: Deploy documentation
645645
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' && needs.setup.outputs.RUN_WEBSITE == 'true' }}
646-
uses: nwtgck/actions-netlify@v4.0
646+
uses: nwtgck/actions-netlify@d22a32a27c918fe470bbc562e984f80ec48c2668 # v4.0.0
647647
with:
648648
publish-dir: 'website/build'
649649
production-branch: main
@@ -700,7 +700,7 @@ jobs:
700700
# Here, we push to most of the allowed repo, so no need to scope
701701
owner: algolia
702702

703-
- uses: actions/checkout@v7
703+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
704704
with:
705705
fetch-depth: 0
706706
ref: ${{ needs.codegen.outputs.generatedCommit }}
@@ -746,7 +746,7 @@ jobs:
746746
SINCE_DATE: ${{ vars.SNIPPETS_SINCE_DATE }}
747747

748748
- name: notify failures
749-
uses: slackapi/slack-github-action@v3.0.3
749+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
750750
if: ${{ !cancelled() && (steps.spreadGeneration.outputs.FAILED_LANGUAGES != '' || steps.waitForAllReleases.outputs.FAILED_RELEASES != '' || steps.indexSnippets.outcome == 'failure') }}
751751
with:
752752
method: chat.postMessage

โ€Ž.github/workflows/cleanup.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
pull-requests: write
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v7
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1616

1717
- run: git push -d origin "generated/${{ github.head_ref }}" || true

โ€Ž.github/workflows/issue.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Create ticket
15-
uses: actions/github-script@v9
15+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1616
with:
1717
script: |
1818
const action = context.payload.action;

โ€Ž.github/workflows/pr-title.ymlโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-22.04
1010
timeout-minutes: 10
1111
steps:
12-
- uses: actions/checkout@v7
12+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Pull Request title rules
17-
uses: Slashgear/action-check-pr-title@v5.0.1
17+
uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8 # v5.0.1
1818
with:
1919
regexp: '^(docs|chore|snippets|guides)|((?:feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)\((?:clients|generators|playground|csharp|dart|go|java|javascript|kotlin|php|python|ruby|scala|swift|cts|specs|scripts|ci|templates|deps)\)): .+'

โ€Ž.github/workflows/push-to-repository.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: Push generated files to the given repository
2020
runs-on: ubuntu-22.04
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
with:
2424
fetch-depth: 0
2525
ref: main

โ€Ž.github/workflows/qc-events-cron.ymlโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-22.04
1515
timeout-minutes: 15
1616
steps:
17-
- uses: actions/checkout@v7
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1818
with:
1919
ref: main
2020

@@ -38,7 +38,7 @@ jobs:
3838
run: yarn runScript index-maintenance/query-categorization/generateEvents.ts
3939

4040
- name: notify slack on failure
41-
uses: slackapi/slack-github-action@v3.0.3
41+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
4242
if: failure()
4343
with:
4444
method: chat.postMessage

โ€Ž.github/workflows/renovate.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
private-key: ${{ secrets.ALGOLIA_BOT_PRIVATE_KEY }}
1818

1919
- name: Renovate Automatic Branch
20-
uses: bodinsamuel/renovate-automatic-branch@v1.0.13
20+
uses: bodinsamuel/renovate-automatic-branch@8a2f5201c591e669091cea33195ad108dbcf34a1 # v1.0.13
2121
with:
2222
github-token: ${{ steps.app-token.outputs.token }}
2323
repo-owner: algolia

โ€Ž.github/workflows/scheduled-release.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Scheduled/Manual Release
1111
runs-on: ubuntu-22.04
1212
steps:
13-
- uses: actions/checkout@v7
13+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1414
with:
1515
fetch-depth: 0
1616
ref: main

0 commit comments

Comments
ย (0)