mirror of
https://github.com/MagicMirrorOrg/MagicMirror.git
synced 2026-03-12 17:51:41 +08:00
*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.
27 lines
854 B
YAML
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 }}
|