File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " npm"
4+ directory : " /"
5+ schedule :
6+ interval : " weekly"
7+ day : " thursday" # Gives us a working day to merge this before our typical release
8+ labels :
9+ - " Update dependencies"
Original file line number Diff line number Diff line change 1+ name : Update dependencies
2+ on :
3+ pull_request :
4+
5+ jobs :
6+ update :
7+ name : Update dependencies
8+ runs-on : macos-latest
9+ if : contains(github.event.pull_request.labels.*.name, 'Update dependencies')
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v2
13+
14+ - name : Remove PR label
15+ env :
16+ REPOSITORY : ' ${{ github.repository }}'
17+ PR_NUMBER : ' ${{ github.event.pull_request.number }}'
18+ GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
19+ run : |
20+ gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
21+
22+ - name : Push updated dependencies
23+ env :
24+ BRANCH : ' ${{ github.head_ref }}'
25+ run : |
26+ git fetch
27+ git checkout $BRANCH
28+ sudo npm install --force -g npm@latest
29+ npm install
30+ npm ci
31+ npm run removeNPMAbsolutePaths
32+ git config --global user.email "github-actions@github.com"
33+ git config --global user.name "github-actions[bot]"
34+ git add node_modules
35+ git commit -am "Update checked-in dependencies"
36+ git push
37+
You can’t perform that action at this time.
0 commit comments