Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f0b2af7

Browse files
committed
Update GitHub workflows
1 parent c561bb4 commit f0b2af7

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

.github/workflows/auto-merge.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1.3.3
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Enable auto-merge for Dependabot PRs
19+
run: gh pr merge --auto --merge "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/main.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,3 @@ jobs:
1818
run: |
1919
bundle exec rake test
2020
bundle exec rake stree:check
21-
automerge:
22-
name: AutoMerge
23-
needs: ci
24-
runs-on: ubuntu-latest
25-
if: github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
26-
steps:
27-
- uses: actions/github-script@v3
28-
with:
29-
script: |
30-
github.pulls.merge({
31-
owner: context.payload.repository.owner.login,
32-
repo: context.payload.repository.name,
33-
pull_number: context.payload.pull_request.number
34-
})

0 commit comments

Comments
 (0)