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: step to check fast-forwardness #5

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
420ea43
ci: step to check fast-forwardness
refucktor Jul 26, 2024
dacb412
ci: update trigger conditions
refucktor Jul 26, 2024
c29a898
ci: update trigger conditions for the ff-merge action
refucktor Jul 26, 2024
908bded
ci: steps to check fast-forwardness of the head ref
refucktor Jul 26, 2024
2c89697
ci: fix syntax for the github-script action
refucktor Jul 26, 2024
975850a
ci: fix syntax for the github-script action
refucktor Jul 26, 2024
556cab4
ci: fix syntax for the checkout action
refucktor Jul 26, 2024
11779d3
ci: remove statements to debug script
refucktor Jul 27, 2024
90ae22a
ci: remove statements to debug script
refucktor Jul 27, 2024
abbff42
ci: remove statements to debug script
refucktor Jul 27, 2024
8971a45
ci: add rest of the script
refucktor Jul 27, 2024
b1fe8b1
ci: final steps to add a Fast-Forward merge label to PRs
refucktor Jul 27, 2024
10b6bd0
ci: tests parsing outputs from another step
refucktor Jul 27, 2024
f50eeb1
ci: fix console log instead of echo
refucktor Jul 27, 2024
31038a8
ci: remove extra quote
refucktor Jul 27, 2024
a3830d6
ci: unify steps to reuse outputs
refucktor Jul 27, 2024
b2e7d5e
ci: debug prev jobs outputs
refucktor Jul 27, 2024
f679ace
ci: debug prev jobs outputs
refucktor Jul 27, 2024
d2a58f9
ci: use needs context to pass flag value
refucktor Jul 27, 2024
8bf4974
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
819b62d
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
74f5050
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
c98198c
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
c437069
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
f9c33f4
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
750ffc7
ci: debug context for github.event.pull_request
refucktor Jul 27, 2024
5c28127
ci: add new workflow to execute the fast-forward merge
refucktor Jul 27, 2024
3176dda
ci: fix syntax
refucktor Jul 27, 2024
abea15b
ci: fix syntax
refucktor Jul 27, 2024
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/ff-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ff-merge
run-name: '🔀 Fast-Forward Merge - ${{ github.ref_name }}'

on:
pull_request: # Trigger action only on pull-requests
types:
- synchronize
- opened
- reopened

permissions:
contents: read

jobs:
check-ffnes:
name: Check Fast-Forwardness
runs-on: ubuntu-latest
steps:
- name: Checkout 💻
uses: actions/[email protected]

- name: Check Fast-Forwardness 🚀
run: |
git fetch origin ${{ github.head_ref }}:refs/remotes/origin/${{ github.head_ref }}
git merge-base --is-ancestor origin/${{ github.head_ref }} origin/main
if [ $? -ne 0 ]; then
echo "This PR is not fast-forwardable. Please rebase your branch."
exit 1
else
echo "This PR is fast-forwardable."
fi