doxa-maps/documentation/contribute/pull-contributor.yml
Doxa Maps 771e68cbcb B21 (2/2): documentation/contribute/, a tutorial for taking contributions from a contributor's own forge
Copied unchanged from the bridge kit (727fb55): TUTORIAL.md (for the repository's GitHub admin,
about 10 minutes), pull-contributor.yml (the workflow it sets up; it refuses a contributor's
changes to .github/) and test-pull-contributor.sh (the TUTORIAL's "check the guard yourself",
which sits next to it). None of them is under .github/, so nothing runs by itself here.
README: one line in the agent section links the tutorial; nothing else in README changes.
2026-10-01 16:35:38 +00:00

27 lines
962 B
YAML

# .github/workflows/pull-contributor.yml
# Copies the contributor's `release` branch into this repo's `contributor` branch,
# about once an hour. Commit it to your default branch. Delete it to stop.
name: Pull contributor
on:
schedule: [{ cron: '17 * * * *' }]
workflow_dispatch: {}
permissions: { contents: write }
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- env: { URL: '${{ secrets.UPSTREAM_URL }}' }
run: |
git fetch --no-tags "$URL" release
# refuse any change they make to .github/
BASE=$(git merge-base HEAD FETCH_HEAD) \
|| BASE=$(git mktree </dev/null)
CHANGED=$(git diff --name-only \
"$BASE" FETCH_HEAD -- .github)
if [ -n "$CHANGED" ]; then
echo "refusing .github/ changes"; exit 1
fi
git push origin \
FETCH_HEAD:refs/heads/contributor