Files
rgbds/.github/workflows/checkdiff.yml
T
2026-04-12 16:06:28 -04:00

22 lines
776 B
YAML

name: Diff completeness check
on: pull_request
jobs:
checkdiff:
runs-on: ubuntu-slim
steps:
- name: Clone repo
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check diff
shell: bash # Bash is the default, but specifying it explicitly enables `-o pipefail`.
run: |
MERGE_BASE=$(gh api "/repos/{owner}/{repo}/compare/$BASE_SHA...$HEAD_SHA" --jq '.merge_base_commit.sha')
git fetch origin "$MERGE_BASE"
contrib/checkdiff.bash "$MERGE_BASE" | sed -E 's/^/::warning::/'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GH_TOKEN: ${{ github.token }}