mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
30 lines
717 B
YAML
30 lines
717 B
YAML
|
name: Check Merge Fast-Forward Only
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
pull_request:
|
||
|
|
||
|
jobs:
|
||
|
check_merge:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Set up Git
|
||
|
run: |
|
||
|
git config user.name "GitHub Action"
|
||
|
git config user.email "noreply@example.com"
|
||
|
|
||
|
- name: Check merge --ff-only
|
||
|
run: |
|
||
|
git fetch origin master:master
|
||
|
git checkout master
|
||
|
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||
|
git merge --ff-only ${{ github.event.pull_request.head.sha }}
|
||
|
else
|
||
|
git merge --ff-only ${{ github.sha }}
|
||
|
fi
|