Skip to content

Commit

Permalink
Log github context
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Mar 11, 2024
1 parent 2389ec0 commit d777d2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,21 @@ jobs:
# labeled: skip-changelog
# label-operator: NOT

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
- name: Enable auto-merge for safe bots PRs
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.event.pull_request.user.login)
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.BOT_PAT || secrets.GITHUB_TOKEN }}

- name: Approve a PR
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.event.pull_request.user.login)
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit d777d2d

Please sign in to comment.