Skip to content

Commit 4786d3d

Browse files
committed
chore: more secure github actions
1 parent 8cc5a16 commit 4786d3d

File tree

5 files changed

+43
-30
lines changed

5 files changed

+43
-30
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525

2626
steps:
27-
- name: Checkout codes
28-
uses: actions/checkout@v4
27+
- name: Checkout
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
fetch-depth: 0
2931

3032
- name: Install pnpm
31-
uses: pnpm/action-setup@v4
33+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
3234

3335
- name: Setup node
34-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3537
with:
3638
node-version: ${{ matrix.node }}
3739
cache: 'pnpm'
@@ -52,14 +54,16 @@ jobs:
5254
runs-on: ${{ matrix.os }}
5355

5456
steps:
55-
- name: Checkout codes
56-
uses: actions/checkout@v4
57+
- name: Checkout
58+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
59+
with:
60+
fetch-depth: 0
5761

5862
- name: Install pnpm
59-
uses: pnpm/action-setup@v4
63+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
6064

6165
- name: Setup node
62-
uses: actions/setup-node@v4
66+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6367
with:
6468
node-version: ${{ matrix.node }}
6569
cache: 'pnpm'
@@ -73,7 +77,7 @@ jobs:
7377
npx tsx ./scripts/postprocess.ts
7478
7579
- name: Cache dist
76-
uses: actions/cache@v4
80+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
7781
with:
7882
path: packages/*/dist
7983
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
@@ -88,14 +92,16 @@ jobs:
8892
runs-on: ${{ matrix.os }}
8993

9094
steps:
91-
- name: Checkout codes
92-
uses: actions/checkout@v4
95+
- name: Checkout
96+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
97+
with:
98+
fetch-depth: 0
9399

94100
- name: Install pnpm
95-
uses: pnpm/action-setup@v4
101+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
96102

97103
- name: Setup node
98-
uses: actions/setup-node@v4
104+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
99105
with:
100106
node-version: ${{ matrix.node }}
101107
cache: 'pnpm'
@@ -121,14 +127,16 @@ jobs:
121127
runs-on: ${{ matrix.os }}
122128

123129
steps:
124-
- name: Checkout codes
125-
uses: actions/checkout@v4
130+
- name: Checkout
131+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
132+
with:
133+
fetch-depth: 0
126134

127135
- name: Install pnpm
128-
uses: pnpm/action-setup@v4
136+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
129137

130138
- name: Setup node
131-
uses: actions/setup-node@v4
139+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
132140
with:
133141
node-version: ${{ matrix.node }}
134142
cache: 'pnpm'
@@ -140,7 +148,7 @@ jobs:
140148
run: pnpm playwright-core install chromium
141149

142150
- name: Restore dist cache
143-
uses: actions/cache@v4
151+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
144152
with:
145153
path: packages/*/dist
146154
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}

.github/workflows/github-label-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: r7kamura/github-label-sync-action@v0
16+
- uses: r7kamura/github-label-sync-action@061649dd3b80eb5bafad0316466f72962e62c300 #v0.1.0

.github/workflows/nightly-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
17+
- name: Checkout
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
fetch-depth: 0
1921

2022
- name: Install pnpm
21-
uses: pnpm/action-setup@v4
23+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
2224

2325
- name: Setup node
24-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2527
with:
2628
node-version: 20
2729
cache: pnpm

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
release:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout codes
20-
uses: actions/checkout@v4
19+
- name: Checkout
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121
with:
2222
ref: ${{ github.head_ref }}
2323

2424
- name: Install pnpm
25-
uses: pnpm/action-setup@v4
25+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
2626

2727
- name: Setup Node
28-
uses: actions/setup-node@v4
28+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2929
with:
3030
node-version: 20
3131

@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Extract version tag
3636
if: startsWith( github.ref, 'refs/tags/v' )
37-
uses: jungwinter/split@v2
37+
uses: jungwinter/split@397a50dadb89335ec4ef406c53105c3c4d407c63 # v2.0.0
3838
id: split
3939
with:
4040
msg: ${{ github.ref }}
@@ -51,7 +51,7 @@ jobs:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5252

5353
- name: Commit changelog
54-
uses: stefanzweifel/git-auto-commit-action@v5
54+
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
5555
with:
5656
branch: v11
5757
file_pattern: '*.md'

.github/workflows/reproduire.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ jobs:
1010
reproduire:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: Checkout
14+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
with:
16+
fetch-depth: 0
1417
- uses: Hebilicious/reproduire@4b686ae9cbb72dad60f001d278b6e3b2ce40a9ac # v0.0.9-mp
1518
with:
1619
label: 'Status: Need More Info' # Optional, will default to this value.

0 commit comments

Comments
 (0)