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:
parent
534bb76b93
commit
966a0b6890
23
.github/workflows/compile_card_db.yml
vendored
23
.github/workflows/compile_card_db.yml
vendored
@ -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
|
|
||||||
|
|||||||
11
.github/workflows/lint_and_test.yml
vendored
11
.github/workflows/lint_and_test.yml
vendored
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user