-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add fast-forward PR merge workflow (#67)
- Loading branch information
abalias
authored
Oct 19, 2022
1 parent
bcb0991
commit 7ce014a
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Fast-forward merge | ||
|
||
# This workflow helps to work around the bug in the **Rebase and Merge** pull requests strategy. | ||
# The bug leads to unsigned commits and prevents using the strategy | ||
# without IOG policy violation (all commits must be signed by PGP signature). | ||
# | ||
# This workflow helps to merge multiple commits from PR to main branch of the repository | ||
# without loosing of PGP signature. | ||
# | ||
# Related GitHub discussions: | ||
# https://github.com/community/community/discussions/10410 | ||
# https://github.com/orgs/community/discussions/5524 | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
fast_forward_job: | ||
name: Fast Forward Merge | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.issue.pull_request != '' && | ||
contains(github.event.comment.body, '/fast-forward') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fast Forward Merge | ||
uses: endre-spotlab/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
success_message: 'Success! Fast forwarded ***target_base*** to ***source_head***! ```git checkout target_base && git merge source_head --ff-only``` ' | ||
failure_message: 'Failed! Cannot do fast forward!' |