Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
ci: Enable auto merge for dependabot
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Sep 6, 2021
1 parent 96804e9 commit 1cd89a2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ permissions:
contents: write

jobs:
dependabot:
metadata:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
outputs:
dependency-names: ${{ steps.metadata.outputs.dependency-names }}
steps:
- name: Dependabot metadata
uses: Xuanwo/[email protected]
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

dependabot:
needs: metadata
if: ${{ needs.metadata.outputs.dependency-names != '' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
Expand All @@ -32,5 +38,12 @@ jobs:

- name: Auto commit
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{contains(needs.metadata.outputs.dependency-names, 'github.com/beyondstorage/go-storage/v4')}}
with:
commit_message: Auto build to generate code

- name: Enable auto-merge for dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.ROBOT_GITHUB_TOKEN }}

0 comments on commit 1cd89a2

Please sign in to comment.