* remove debug job, restrict create-pull-request to only awards.txt, add documentation * make create-pull-request use a custom branch, and filter that out, so PRs generated by action don't invoke action again * add permissions: line * pull-requests write instead of all --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
name: extend-awards
|
|
run-name: Extending awards
|
|
on:
|
|
pull_request:
|
|
types: [ closed ]
|
|
branches:
|
|
- master
|
|
permissions:
|
|
pull-requests: write
|
|
jobs:
|
|
if_merged:
|
|
if: |
|
|
github.event_name == 'pull_request' &&
|
|
github.event.action == 'closed' &&
|
|
github.event.pull_request.merged == true &&
|
|
github.event.pull_request.head.ref != 'extend-awards/patch'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- run: pip install requests
|
|
- run: python extend-awards.py
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
- uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
add-paths: awards.csv
|
|
branch: extend-awards/patch
|
|
commit-message: Extending awards.csv
|
|
title: Extending awards.csv
|
|
body: A PR was merged that solves an issue and awards.csv should be extended.
|