Skip to content

Commit 4f65122

Browse files
committed
Upgrade formatter workflow to actions/cache v4
1 parent 9b50b5a commit 4f65122

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/formatter.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
# This workflow runs the `format` script on the codebase when
1+
# This workflow runs the `format` script on the codebase when
22
# code is pushed to master.
33

4-
54
name: Run Formatter on episode transcripts
65

76
on:
87
push:
9-
branches: [ master ]
8+
branches: [master]
109
workflow_dispatch: # create a button to run on demand
1110
jobs:
1211
run-formatter:
1312
runs-on: ubuntu-latest
1413
steps:
1514
- name: Checkout code
1615
uses: actions/checkout@v2
17-
16+
1817
- name: Use Node.js 14.x
1918
uses: actions/setup-node@v1
2019
with:
2120
node-version: 14.x
22-
21+
2322
- name: Cache node modules
24-
uses: actions/cache@v2
23+
uses: actions/cache@v4
2524
env:
2625
cache-name: cache-node-modules
2726
with:
@@ -31,14 +30,14 @@ jobs:
3130
restore-keys: |
3231
${{ runner.os }}-build-${{ env.cache-name }}-
3332
${{ runner.os }}-build-
34-
${{ runner.os }}-
35-
33+
${{ runner.os }}-
34+
3635
- name: run npm install
3736
run: npm install
38-
37+
3938
- name: run formatter
4039
run: npm run format
41-
40+
4241
- name: Commit and push if it changed
4342
run: |-
4443
git config user.name "Logbot"
@@ -47,7 +46,7 @@ jobs:
4746
git commit -m "$(npm run commitMessage --silent)" || exit 0
4847
git push
4948
50-
## Alternative to Automatic Push.
49+
## Alternative to Automatic Push.
5150
## Left here in case we ever want to go back to PR instead of push
5251
# - name: Create Pull Request
5352
# uses: peter-evans/create-pull-request@v3

0 commit comments

Comments
 (0)