Merge pull request #56 from Atotti/takuo_w5 #88
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: Update-Progress | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
workflow_dispatch: | |
inputs: | |
purpose: | |
description: "Purpose to manually run" | |
required: true | |
default: "test" | |
permissions: write-all | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
env: | |
FILE_NAME: "progress.png" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Echo your purpose | |
if: ${{ github.event.inputs.purpose != '' }} | |
run: | | |
echo "Purpose: ${{ github.event.inputs.purpose }}" | |
- name: Print Python info | |
run: | | |
echo "python --version: `python --version`" | |
echo "python3 --version: `python3 --version`" | |
- name: Update ${{ env.FILE_NAME }} | |
run: | | |
python -m pip install -r .automation/requirements.txt | |
python .automation/make_progress.py | |
- name: Commit ${{ env.FILE_NAME }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add $FILE_NAME | |
git diff-index --quiet HEAD || git commit -m "[Bot] Update ${FILE_NAME}" | |
git push |