Files
MagicMirror/.github/workflows/enforce-pullrequest-rules.yaml
Kristjan ESPERANTO 56fe067afa chore: migrate CI workflows to ubuntu-slim for faster startup times (#4007)
*This type of runner is optimized for automation tasks, issue operations
and short-running jobs. They are not suitable for typical heavyweight
CI/CD builds.*
[[1](https://docs.github.com/en/actions/reference/runners/github-hosted-runners#single-cpu-runners)].

We are not necessarily dependent on faster startups, but that seems to
be becoming the best practice now.
2026-01-07 23:18:24 +01:00

27 lines
854 B
YAML

# This workflow enforces on every pull request that the PR is not based against master,
# taken from https://github.com/oppia/oppia-android/blob/develop/.github/workflows/static_checks.yml
name: "Enforce Pull-Request Rules"
on:
pull_request:
push:
branches-ignore:
- develop
- master
jobs:
check:
runs-on: ubuntu-slim
if: github.event_name == 'pull_request'
timeout-minutes: 10
steps:
- name: "Branch is not based on develop"
if: ${{ github.base_ref != 'develop' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
run: |
echo "Current base branch: $BASE_BRANCH"
echo "Note: PRs should only ever be merged into develop so please rebase your branch on develop and try again."
exit 1
env:
BASE_BRANCH: ${{ github.base_ref }}