File tree 2 files changed +82
-0
lines changed
2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ on : pull_request_target
2
+
3
+ name : pull_request_target
4
+
5
+ permissions :
6
+ pull-requests : write
7
+ contents : write
8
+
9
+ jobs :
10
+ metadata :
11
+ runs-on : ubuntu-latest
12
+
13
+ outputs :
14
+ repository : ${{ steps.metadata.outputs.repository }}
15
+
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - uses : ahmadnassri/action-metadata@v2
20
+ id : metadata
21
+
22
+ auto-merge :
23
+ timeout-minutes : 5
24
+
25
+ runs-on : ubuntu-latest
26
+
27
+ # only run for dependabot PRs
28
+ if : ${{ github.actor == 'dependabot[bot]' }}
29
+
30
+ env :
31
+ PR_URL : ${{github.event.pull_request.html_url}}
32
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
33
+
34
+ steps :
35
+ - id : dependabot
36
+ uses : dependabot/fetch-metadata@v2
37
+ with :
38
+ github-token : ${{ secrets.GITHUB_TOKEN }}
39
+
40
+ - name : auto merge conditions
41
+ id : auto-merge
42
+ if : |
43
+ (
44
+ steps.dependabot.outputs.update-type == 'version-update:semver-patch' &&
45
+ contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type)
46
+ ) || (
47
+ steps.dependabot.outputs.update-type == 'version-update:semver-minor' &&
48
+ contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type)
49
+ )
50
+ run : echo "::notice ::auto-merge conditions satisfied"
51
+
52
+ - name : auto approve pr
53
+ if : ${{ steps.auto-merge.conclusion == 'success' }}
54
+ run : |
55
+ gh pr review --approve "$PR_URL"
56
+ gh pr merge --auto --rebase "$PR_URL"
Original file line number Diff line number Diff line change
1
+ name : Create labels
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+
8
+ jobs :
9
+ labeler :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ -
13
+ name : Checkout
14
+ uses : actions/checkout@v3
15
+ -
16
+ name : Run Labeler
17
+ if : success()
18
+ uses : crazy-max/ghaction-github-labeler@v4
19
+ with :
20
+ github-token : ${{ secrets.GITHUB_TOKEN }}
21
+ yaml-file : .github/labels.yml
22
+ skip-delete : false
23
+ dry-run : false
24
+ exclude : |
25
+ help*
26
+ *issue
You can’t perform that action at this time.
0 commit comments