Skip to content

Commit

Permalink
ci: 🎡 Add check for fast-forward merges
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantasdeveloper committed May 16, 2024
1 parent 81bc870 commit 85e1922
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
name: Building and releasing project
runs-on: ubuntu-latest
needs: [lint, build, test]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -112,4 +113,28 @@ jobs:
- name: Clear SSH key
run: |
shred /tmp/id_ed25519
check-fast-forward:
name: Check if fast forwarding is possible
runs-on: ubuntu-latest
needs: [lint, build, test]
if: github.event_name == 'pull_request'

permissions:
contents: read
# We appear to need write permission for both pull-requests and
# issues in order to post a comment to a pull request.
pull-requests: write
issues: write

steps:
- name: Checking if fast forwarding is possible
uses: sequoia-pgp/fast-forward@v1
with:
merge: false
# To reduce the workflow's verbosity, use 'on-error'
# to only post a comment when an error occurs, or 'never' to
# never post a comment. (In all cases the information is
# still available in the step's summary.)
comment: never
# TODO @polymath-eric: add SonarCloud step when the account confusion is sorted

0 comments on commit 85e1922

Please sign in to comment.