fix: workflow #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto update | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run-akashi-schedule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- run: poetry install --no-interaction | |
- name: Run akashi_schedule | |
run: | | |
poetry run python -m script.akashi_schedule | |
- name: Checkout a new branch | |
run: | | |
git checkout -b data_update_${{github.run_id}} | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "GitHub Actions Update" | |
add: "data/*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: create pull request | |
run: gh pr create -B base_branch -H branch_to_merge --title 'Merge branch_to_merge into base_branch' --body 'Created by Github action' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |