2024-01-17: 春日部市藤塚 #98
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: Create New Post | |
on: | |
issues: | |
types: | |
- closed | |
jobs: | |
process-issue: | |
if: github.event.issue.user.login == 'TheodoreKrypton' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r scripts/requirements.txt | |
- name: Generate Post | |
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python scripts/create_post.py ${{ github.event.issue.number }} | |
- name: commit and push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: Post Editor | |
author_email: [email protected] | |
message: 'create post' | |
- name: reopen issue if the workflow failed | |
if: failure() | |
run: GITHUB_TOKEN=${{ secrets.PERSONAL_TOKEN }} python scripts/reopen_issue.py ${{ github.event.issue.node_id }} |