File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ⚙️ Deduplicate yarn.lock
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - dev
7
+ paths :
8
+ - ./yarn.lock
9
+
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress : true
13
+
14
+ jobs :
15
+ format :
16
+ if : github.repository == 'remix-run/react-router'
17
+ runs-on : ubuntu-latest
18
+
19
+ steps :
20
+ - name : ⬇️ Checkout repo
21
+ uses : actions/checkout@v3
22
+
23
+ - name : ⎔ Setup node
24
+ uses : actions/setup-node@v3
25
+ with :
26
+ node-version-file : " .nvmrc"
27
+ cache : " yarn"
28
+
29
+ - name : ⚙️ Dedupe yarn.lock
30
+ run : npx yarn-deduplicate && rm -rf ./node_modules && yarn
31
+
32
+ - name : 💪 Commit
33
+ run : |
34
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
35
+ git config --local user.name "github-actions[bot]"
36
+ git add .
37
+ if [ -z "$(git status --porcelain)" ]; then
38
+ echo "💿 no deduplication needed"
39
+ exit 0
40
+ fi
41
+ git commit -m "chore: deduplicate `yarn.lock`"
42
+ git push
43
+ echo "💿 https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"
You can’t perform that action at this time.
0 commit comments