-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.28 KB
/
dependabot_npm_install.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# pages の dependabot はバージョン更新後に npm install をしてあげないと package-lock.json との統合性が取れなくなるっぽいのでそれをする
name: npm install after dependabot
on:
pull_request:
branches:
- pre-development
paths:
- 'pages/**'
workflow_dispatch:
env:
NODE_VERSION: 20.16.0
permissions:
contents: write
jobs:
npm-install:
runs-on: ubuntu-latest
environment:
name: bot
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install
run: npm install
- name: get diff
id: diff
continue-on-error: true
run: |
git add -N .
git diff --name-only --exit-code
- name: commit and push
if: steps.diff.outcome == 'failure'
run: |
set -x
git config user.name "maretol-bot"
git config user.email "[email protected]"
git add .
git commit -m "[bot]chore(deps): update dependencies"
git push
recall-deploy-dry:
needs: npm-install
uses: ./.github/workflows/deploy_dryrun.yaml