Skip to content

Commit

Permalink
Move github action to workflows folder
Browse files Browse the repository at this point in the history
  • Loading branch information
miry committed May 10, 2023
1 parent b67253d commit 6e3953e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ permissions:
contents: write
pull-requests: write

env:
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true

jobs:
dependabot:
runs-on: ubuntu-latest
Expand All @@ -19,12 +23,17 @@ jobs:
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Debug outputs variable
run: echo ${{steps.dependabot-metadata.outputs.directory}}

- name: Approve a PR
if: ${{contains(steps.dependabot-metadata.outputs.directory, '/test')}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
if: success()
run: gh pr merge --auto --merge "$PR_URL"
Expand Down

0 comments on commit 6e3953e

Please sign in to comment.