Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add fast-forward merge support #52

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/fast-forward.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: fast-forward for PR
# GitHub doesn't support fast-forward merge of PR,
# which causes GPG signatures overriden by GitHub's key.
# This workflow allows maintainers to do a fast-forward merge
# by replying `/fast-forward` to the PR.
#
# Contributors must first rebase onto the latest commit before PR to make fast-forward possible.
on:
issue_comment:
types: [created, edited]
jobs:
fast-forward:
if: ${{ contains(github.event.comment.body, '/fast-forward')
&& github.event.issue.pull_request }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Check User Permission
id: check-perm
uses: actions-cool/[email protected]
with:
require: write

- name: Fast forwarding
if: steps.check-perm.outputs.require-result
uses: sequoia-pgp/fast-forward@v1
with:
merge: true
comment: on-error