dash/.github/workflows/merge-check.yml
UdjinM6 d574ca6197
ci: bump actions/checkout and actions/cache to v3 (#5519)
## Issue being fixed or feature implemented
Should fix warnings like
> The following actions uses node12 which is deprecated and will be
forced to run on node16: actions/checkout@v2, actions/cache@v2. For more
info:
https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

https://github.com/dashpay/dash/actions/runs/5705358251?pr=5448
https://github.com/dashpay/dash/actions/runs/5705358315?pr=5448
https://github.com/dashpay/dash/actions/runs/5705358316?pr=5448
https://github.com/dashpay/dash/actions/runs/5715249078?pr=5448

## What was done?

## How Has This Been Tested?

## Breaking Changes


## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2023-08-01 12:17:40 -05:00

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@v3
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