add plugin tnt_roulette
#89
This file contains 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
# Check Pull Requests | |
# See also: .github/workflows/scripts | |
name: PR Check and Report | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
on: | |
pull_request_target: | |
branches: | |
- master | |
paths-ignore: # Skip run for security reasons | |
- .github/workflows/**/*.py | |
types: | |
- opened | |
- synchronize | |
- closed | |
- labeled | |
jobs: | |
pr-check: | |
runs-on: ubuntu-latest | |
# To reduce useless runs | |
if: | | |
(github.event.action != 'closed' || github.event.pull_request.merged) && | |
(github.event.action != 'labeled' || github.event.label.name == 'recheck') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-: | |
- name: Setup Requirements | |
run: | | |
pip install -r scripts/requirements.txt | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
json: true | |
write_output_files: true | |
- name: Check and Report | |
run: | | |
python .github/workflows/scripts/check.py | |
env: | |
# scripts | |
github_api_token: ${{ secrets.GITHUB_TOKEN }} | |
EVENT_TYPE: ${{ github.event.action }} | |
IS_MERGED: ${{ github.event.pull_request.merged }} | |
# gh_cli | |
PR_NUMBER: ${{ github.event.number }} |