Test auto pr (#336)

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.
This commit is contained in:
Peter Gorniak 2021-02-22 12:19:04 -08:00 committed by GitHub
parent 534bb76b93
commit 966a0b6890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
name: Compile Card DB name: Compile Card DB
on: [push, pull_request, workflow_dispatch] on: [pull_request_target, workflow_dispatch]
jobs: jobs:
compile_card_db: compile_card_db:
@ -15,17 +15,12 @@ jobs:
pip install . pip install .
- name: Update Languages - name: Update Languages
run: doit update_languages run: doit update_languages
- uses: dorny/paths-filter@v2 - name: Make PR
id: filter uses: peter-evans/create-pull-request@v3
with: with:
base: HEAD base: ${{ github.head_ref }}
filters: | body: |
cardb_target: Auto-generate package card DB to from source card DB
- src/domdiv/card_db/** delete-branch: true
- name: Commit Results reviewers: sumpfork
if: steps.filter.outputs.cardb_target == 'true' assignees: sumpfork
run: |
git config --global user.name 'Github Action: Compile Card DB'
git config --global user.email 'sumpfork@users.noreply.github.com'
git commit -am "Compile Card DB"
git push

View File

@ -1,6 +1,6 @@
name: Lint and Test name: Lint and Test
on: [push, pull_request, workflow_dispatch] on: [pull_request_target, workflow_dispatch]
jobs: jobs:
lint_and_test: lint_and_test:
@ -14,5 +14,14 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Lint - name: Lint
run: pre-commit run --all-files 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 - name: Test
run: python setup.py test run: python setup.py test