Make PR instead of trying to push to branch. Use `pull_request_target` to run on base version of PR and hopefully have correct permissions to make a PR.
28 lines
679 B
YAML
28 lines
679 B
YAML
name: Lint and Test
|
|
|
|
on: [pull_request_target, workflow_dispatch]
|
|
|
|
jobs:
|
|
lint_and_test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- run: |
|
|
pip install -r requirements.txt
|
|
- name: Lint
|
|
run: pre-commit run --all-files
|
|
- name: Make PR
|
|
uses: peter-evans/create-pull-request@v3
|
|
with:
|
|
base: ${{ github.head_ref }}
|
|
body: |
|
|
Fix style/lint issues
|
|
delete-branch: true
|
|
reviewers: sumpfork
|
|
assignees: sumpfork
|
|
- name: Test
|
|
run: python setup.py test
|