File tree 1 file changed +62
-0
lines changed
1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Dedupe Dependabot PRs
2
+
3
+ on :
4
+ push :
5
+ branches : ['dependabot/**']
6
+
7
+ permissions :
8
+ contents : write
9
+ pull-requests : write
10
+ repository-projects : write
11
+
12
+ jobs :
13
+ dedupe :
14
+ name : Dedupe Dependabot PRs
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v3
20
+
21
+ - name : Cache .yarn/cache
22
+ uses : actions/cache@v3
23
+ env :
24
+ cache-name : yarn-cache
25
+ with :
26
+ path : .yarn/cache
27
+ key : ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-${{ env.cache-name }}
30
+
31
+ - name : Use Node.js
32
+ uses : actions/setup-node@v3
33
+ with :
34
+ node-version : ' 16'
35
+
36
+ - name : Enable Corepack
37
+ run : corepack enable
38
+
39
+ - name : Configure Git
40
+ run : |
41
+ git config user.name 'github-actions[bot]'
42
+ git config user.email 'github-actions[bot]@users.noreply.github.com'
43
+
44
+ - name : Detect working directory
45
+ run : |
46
+ echo "WORKING_DIRECTORY=$(git log -1 --pretty=%B | sed -n 's/.* in \(\/.*\)$/\1/p')" >> $GITHUB_ENV
47
+
48
+ - name : Dedupe dependencies
49
+ run : yarn dedupe
50
+ working-directory : ${{ env.WORKING_DIRECTORY }}
51
+ env :
52
+ HUSKY : 0
53
+
54
+ - name : Commit changes
55
+ run : |
56
+ git add .
57
+ git commit -m 'Dedupe dependencies'
58
+ working-directory : ${{ env.WORKING_DIRECTORY }}
59
+
60
+ - name : Push changes
61
+ run : git push
62
+ working-directory : ${{ env.WORKING_DIRECTORY }}
You can’t perform that action at this time.
0 commit comments