Skip to content

Commit 84254e2

Browse files
authored
Fix the workflows (#427)
1 parent 5121c59 commit 84254e2

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

.github/dependabot-auto-merge.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ on:
99

1010
workflow_dispatch:
1111

12-
permissions:
13-
actions: read
14-
checks: write
15-
contents: none
16-
deployments: none
17-
issues: none
18-
packages: none
19-
pull-requests: write
20-
repository-projects: none
21-
security-events: write
22-
statuses: write
23-
2412
jobs:
2513

2614
build-client:
Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1-
name: dependabot-auto-merge
1+
name: auto-merge
22

3-
on:
4-
pull_request_target:
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
58

69
jobs:
710
auto-merge:
811
runs-on: ubuntu-latest
912

10-
if: github.actor == 'dependabot[bot]'
13+
if: github.event.pull_request.draft == false
1114

1215
steps:
1316
- uses: actions/checkout@v5
1417

15-
- uses: ahmadnassri/action-dependabot-auto-merge@v2
16-
with:
17-
github-token: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }}
18-
config: .github/dependabot-auto-merge.yml
19-
20-
- name: Slack Notification (not success)
21-
uses: lazy-actions/slatify@master
22-
if: "! success()"
23-
continue-on-error: true
24-
with:
25-
job_name: '*auto-merge*'
26-
type: ${{ job.status }}
27-
icon_emoji: ":octocat:"
28-
url: ${{ secrets.SLACK_WEBHOOK }}
29-
token: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }}
18+
- name: Enable auto-merge for Pull Request
19+
run: |
20+
gh pr review --approve "$PR_URL"
21+
gh pr merge --auto --squash "$PR_URL"
22+
env:
23+
PR_URL: ${{github.event.pull_request.html_url}}
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)