Skip to content

Commit fac47f5

Browse files
committed
ci: Pin external actions to Git SHAs
1 parent a22761c commit fac47f5

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/single_sdk_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# At this stage we don't know which repo we have just checked out. We will reference this repo
3333
# if the workflow uses '.'
3434
- name: Checkout repo
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3636
- name: Resolve branches
3737
shell: bash
3838
# these env vars will be modified and used in subsequent steps
@@ -104,18 +104,18 @@ jobs:
104104
docker pull mitmproxy/mitmproxy:10.1.5
105105
docker tag ghcr.io/matrix-org/synapse-service:v1.117.0 homeserver:latest
106106
- name: Setup | Go
107-
uses: actions/setup-go@v6
107+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
108108
with:
109109
go-version: "1.25"
110110
- name: "Install Complement Dependencies"
111111
shell: bash
112112
run: |
113-
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
113+
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@4c97682ab858d6bbd26fc020e255cb339c9c8119 # v2.5.0
114114
115115
# JS SDK only steps
116116
- name: Setup | Node.js LTS
117117
if: ${{ inputs.use_js_sdk != '' }}
118-
uses: actions/setup-node@v3
118+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
119119
with:
120120
node-version: "lts/*"
121121
- name: "Install JS SDK"
@@ -128,7 +128,7 @@ jobs:
128128
# which we then pass to rebuild_rust_sdk.sh
129129
- name: Setup | Rust
130130
if: ${{ inputs.use_rust_sdk != '' }}
131-
uses: dtolnay/rust-toolchain@stable
131+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable v1.93.1
132132
with:
133133
toolchain: stable
134134
- name: "Download Rust SDK" # no need to download rust SDK if we are using the local checkout.
@@ -182,7 +182,7 @@ jobs:
182182
RUST_SDK_LIB_RELATIVE: ${{ inputs.use_rust_sdk == '.' && '/target/debug' || '/complement-crypto/rust-sdk/target/debug'}}
183183

184184
- name: Upload logs
185-
uses: actions/upload-artifact@v4
185+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
186186
if: ${{ failure() }}
187187
with:
188188
name: Logs - ${{ inputs.use_js_sdk != '' && 'jssdk' || 'rust'}}

.github/workflows/tests.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: ["main"]
66
pull_request:
77
workflow_dispatch:
88

@@ -15,35 +15,35 @@ jobs:
1515
name: Tests (JS only, latest)
1616
uses: ./.github/workflows/single_sdk_tests.yml
1717
with:
18-
use_js_sdk: 'MATCHING_BRANCH'
19-
use_complement_crypto: '.'
18+
use_js_sdk: "MATCHING_BRANCH"
19+
use_complement_crypto: "."
2020

2121
rust-latest-main:
2222
name: Tests (Rust only, latest)
2323
uses: ./.github/workflows/single_sdk_tests.yml
2424
with:
25-
use_rust_sdk: 'MATCHING_BRANCH'
26-
use_complement_crypto: '.'
25+
use_rust_sdk: "MATCHING_BRANCH"
26+
use_complement_crypto: "."
2727

2828
complement:
2929
name: Tests
3030
runs-on: ubuntu-22.04
3131
steps:
32-
- uses: actions/checkout@v3 # Checkout crypto tests
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3333

3434
# Install Node, Go and Rust, along with gotestfmt
3535
- name: Setup | Node.js LTS
36-
uses: actions/setup-node@v3
36+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
3737
with:
3838
node-version: "lts/*"
39-
cache: 'yarn'
39+
cache: "yarn"
4040
cache-dependency-path: "internal/api/js/js-sdk/yarn.lock"
4141
- name: Setup | Go
42-
uses: actions/setup-go@v4
42+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
4343
with:
44-
go-version: '1.21'
44+
go-version: "1.21"
4545
- name: Setup | Rust
46-
uses: dtolnay/rust-toolchain@stable
46+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable v1.93.1
4747
with:
4848
toolchain: stable
4949
- name: Checkout matrix-rust-sdk
@@ -53,12 +53,12 @@ jobs:
5353
wget -O archive.tar.gz "https://github.com/matrix-org/matrix-rust-sdk/archive/$BRANCH.tar.gz"
5454
zcat < archive.tar.gz | git get-tar-commit-id # useful for debugging
5555
tar -xz --strip-components=1 -C rust-sdk < archive.tar.gz
56-
- uses: Swatinem/rust-cache@v2
56+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
5757
with:
5858
workspaces: "rust-sdk"
5959
- name: "Install Complement Dependencies"
6060
run: |
61-
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
61+
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@4c97682ab858d6bbd26fc020e255cb339c9c8119 # v2.5.0
6262
6363
# Install whatever version of the JS SDK is in package.json
6464
- name: Build JS SDK
@@ -161,10 +161,10 @@ jobs:
161161
DOCKER_BUILDKIT: 1
162162
163163
- name: Upload logs
164-
uses: actions/upload-artifact@v4
164+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
165165
if: ${{ always() }} # do this even if the tests fail
166166
with:
167167
name: Logs - ${{ job.status }}
168168
path: |
169-
./**/logs/*
170-
./**/mitm.dump
169+
./**/logs/*
170+
./**/mitm.dump

0 commit comments

Comments
 (0)