-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (43 loc) · 1.29 KB
/
update-progress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Update-Progress
on:
push:
branches-ignore:
- "ch**"
workflow_dispatch:
inputs:
purpose:
description: "Purpose to manually run"
required: true
default: "test"
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: Configure github-actions bot Git config
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit ${{ env.FILE_NAME }}
run: |
git add $FILE_NAME
git diff-index --quiet HEAD || git commit -m "bot: Update progress"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}