0dcb0518be
Update Github actions to their latest versions to fix the following warnings on runs: ``` Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. ``` `actions/checkout` and `actions/cache` are straight Node version upgrades, `actions/upload-artifact` and `actions/download-artifact` have breaking changes, but don't appear to affect our usage. https://github.com/actions/upload-artifact Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Pull Request Assigner
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
branches:
|
|
- main
|
|
- collab-*
|
|
- v*-branch
|
|
issues:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
assignment:
|
|
name: Pull Request Assignment
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Install Python dependencies
|
|
run: |
|
|
sudo pip3 install -U setuptools wheel pip
|
|
pip3 install -U PyGithub>=1.55 west
|
|
|
|
- name: Check out source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run assignment script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
|
|
run: |
|
|
FLAGS="-v"
|
|
FLAGS+=" -o ${{ github.event.repository.owner.login }}"
|
|
FLAGS+=" -r ${{ github.event.repository.name }}"
|
|
FLAGS+=" -M MAINTAINERS.yml"
|
|
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
|
|
FLAGS+=" -P ${{ github.event.pull_request.number }}"
|
|
elif [ "${{ github.event_name }}" = "issues" ]; then
|
|
FLAGS+=" -I ${{ github.event.issue.number }}"
|
|
elif [ "${{ github.event_name }}" = "schedule" ]; then
|
|
FLAGS+=" --modules"
|
|
else
|
|
echo "Unknown event: ${{ github.event_name }}"
|
|
exit 1
|
|
fi
|
|
|
|
python3 scripts/set_assignees.py $FLAGS
|