2020-11-16 22:59:12 +00:00
|
|
|
name: "Auto Update README"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Update README
|
|
|
|
run: |
|
|
|
|
python .github/README.py --tag $(git describe --tags --abbrev=0)
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Commit files
|
|
|
|
run: |
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git commit -m "Auto Update README [$(date)] :robot:" -a
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: ${{ github.ref }}
|