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
on: [push, pull_request, workflow_dispatch]
on: [pull_request_target, workflow_dispatch]
jobs:
compile_card_db:
@ -15,17 +15,12 @@ jobs:
pip install .
- name: Update Languages
run: doit update_languages
- uses: dorny/paths-filter@v2
id: filter
- name: Make PR
uses: peter-evans/create-pull-request@v3
with:
base: HEAD
filters: |
cardb_target:
- src/domdiv/card_db/**
- name: Commit Results
if: steps.filter.outputs.cardb_target == 'true'
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
base: ${{ github.head_ref }}
body: |
Auto-generate package card DB to from source card DB
delete-branch: true
reviewers: sumpfork
assignees: sumpfork

View File

@ -1,6 +1,6 @@
name: Lint and Test
on: [push, pull_request, workflow_dispatch]
on: [pull_request_target, workflow_dispatch]
jobs:
lint_and_test:
@ -14,5 +14,14 @@ jobs:
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