Skip to content

Commit

Permalink
Attempt automerge (1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Dec 13, 2023
1 parent 495a9ce commit 0bcb6f2
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/merge-dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,33 @@ jobs:

steps:

- name: Fetch metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # 1.6.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
with:
# When running on `pull_request` use the PR branch, not the target branch
ref: ${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}

- name: Setup GPG
id: setup-gpg
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # 6.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Diagnostics
env:
PR_URL: ${{ github.event.pull_request.url }}
run: |
echo "$PR_URL"
- name: Automatically merge
env:
GH_TOKEN: ${{ github.token }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_URL: ${{ github.event.pull_request.url }}
PR_REF: ${{ github.head_ref }}
run: |
gh pr merge --auto -m "$PR_URL"
git fetch "$PR_URL"
git cherry-pick main.."$PR_REF"
git push -f "$PR_URL"
git push origin

0 comments on commit 0bcb6f2

Please sign in to comment.