Repository navigation
The app's examples, as community projects #7
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: Check | ||
|
Check warning on line 1 in .github/workflows/check.yml
|
||
| # pull_request_target, so the workflow and community.py are the base branch's: a pull request | ||
| # cannot change what checks it. Its files are only read, never run, and the token can only read. | ||
| on: | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened] | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read # its list of files | ||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| path: pr | ||
| persist-credentials: false | ||
| - uses: astral-sh/setup-uv@v6 | ||
| # The `sp` that checks a package is the app's. SP_REF, a repository variable, pins another | ||
| # branch or tag of it; without one it is main's. | ||
| - run: uv tool install "super-prototyping-tools @ git+https://github.com/ReScienceLab/super-prototyping@${SP_REF}#subdirectory=tools" | ||
| env: | ||
| SP_REF: ${{ vars.SP_REF || 'main' }} | ||
| - run: python3 .github/community.py check pr "$OPENER" "$OPENER_ID" | ||
| env: | ||
| OPENER: ${{ github.event.pull_request.user.login }} | ||
| OPENER_ID: ${{ github.event.pull_request.user.id }} | ||
| PR: ${{ github.event.pull_request.number }} | ||
| CHANGED_FILES: ${{ github.event.pull_request.changed_files }} | ||
| GH_TOKEN: ${{ github.token }} | ||