11name : Checks
22on :
33 pull_request :
4- # we're doing the filtering for branches and actions in each step,
5- # this one here works not as expected and could be misleading
6- # branches:
7- # - migrating-to-yaml-syntax
8- # - master
9- # action:
10- # - opened
11- # - edited
12- # - synchronize
134
145env :
156 GITHUB_TOKEN : ${{ secrets.PS_GITHUB_ACCESSTOKEN }}
@@ -20,12 +11,10 @@ jobs:
2011 runs-on : ubuntu-latest
2112 steps :
2213 - name : Checkout branch
23- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
24- uses : actions/checkout@v2
14+ uses : actions/checkout@v4
2515
2616 - name : Set Node.js 16
27- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
28- uses : actions/setup-node@v2
17+ uses : actions/setup-node@v4
2918 with :
3019 node-version : " 16"
3120 cache : ' yarn'
@@ -35,37 +24,20 @@ jobs:
3524 npm config set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
3625
3726 - name : Install yarn
38- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
3927 run : yarn install --frozen-lockfile
4028
4129 - name : yarn format-check
42- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
4330 run : yarn check
4431
4532 build :
4633 name : Build
4734 runs-on : ubuntu-latest
4835 steps :
4936 - name : Checkout branch
50- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
51- 52-
53- - name : Checkout master
54- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
55- 56- with :
57- ref : master
58-
59- - name : Check merge
60- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
61- run : |
62- git config --global user.name "Spring Media CD"
63- git config --global user.email "[email protected] " 64- git merge ${{ github.event.pull_request.head.sha }} -m"prchecker" --stat
37+ uses : actions/checkout@v4
6538
6639 - name : Set Node.js 16
67- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
68- uses : actions/setup-node@v2
40+ uses : actions/setup-node@v4
6941 with :
7042 node-version : " 16"
7143 cache : ' yarn'
@@ -75,13 +47,10 @@ jobs:
7547 npm config set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
7648
7749 - name : Install yarn
78- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
7950 run : yarn install --frozen-lockfile
8051
8152 - name : Test yarn
82- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
8353 run : yarn test
8454
8555 - name : Build yarn
86- if : github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize'
8756 run : yarn build
0 commit comments