Repository navigation
test: probe whether GITHUB_TOKEN bypasses rulesets #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Protection Probe | |
| on: | |
| push: | |
| branches: [chore/probe-workflow] | |
| permissions: | |
| contents: write | |
| jobs: | |
| probe: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: protection-probe | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Attempt bot push to ruleset-protected branch | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| echo "bot probe $(date -u +%s)" >> .probe-tmp.txt | |
| git add .probe-tmp.txt | |
| git commit -m "test: bot push probe" | |
| echo "=====BOT_PUSH_BEGIN=====" | |
| if git push origin HEAD:protection-probe 2>&1; then | |
| echo "=====BOT_PUSH_RESULT: ALLOWED=====" | |
| else | |
| echo "=====BOT_PUSH_RESULT: REFUSED=====" | |
| fi |