基于Github Action自动生成并更新GitHub Issue博客的ReadMe #16
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: CI | |
on: [issues, issue_comment] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: install dependencies | |
run: | | |
pip3 install setuptools --user | |
pip3 install PyGithub --user | |
pip3 install wordcloud --user | |
pip3 install matplotlib --user | |
- name: run python script | |
env: | |
GITHUB_LOGIN: notquiteleo | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python3 main.py | |
- name: config git info | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Leo" | |
- name: commit change | |
run: | | |
git checkout master | |
git pull | |
git add . | |
git commit -m "Update from Github Action" | |
- name: push change | |
env: | |
GITHUB_LOGIN: notquiteleo | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git push https://$GITHUB_LOGIN:[email protected]/$GITHUB_REPOSITORY.git | |
- name: done | |
run: echo 'done' |