-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhangshangjin
committed
Jan 18, 2021
1 parent
77f82c3
commit a383104
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
name: Generate GitBlog README | ||
|
||
on: | ||
workflow_dispatch: | ||
issues: | ||
types: [opened, edited, deleted] | ||
types: [opened, edited] | ||
issue_comment: | ||
types: [created, edited] | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- main.py | ||
|
||
env: | ||
GITHUB_NAME: simplefeel | ||
GITHUB_EMAIL: [email protected] | ||
|
||
jobs: | ||
sync: | ||
name: Generate README | ||
|
@@ -38,18 +45,18 @@ jobs: | |
pip install -r requirements.txt | ||
if: steps.pip-cache.outputs.cache-hit != 'true' | ||
|
||
- name: Generate new md | ||
- name: Generate new md # if you fork or clone this repo, please delete the curl line unless you know why | ||
run: | | ||
echo ${{github.repository}} | ||
source venv/bin/activate | ||
python main.py ${{ secrets.Z_S_J }} ${{github.repository}} | ||
python main.py ${{ secrets.Z_S_T }} ${{ github.repository }} --issue_numbe '${{ github.event.issue.number }}' | ||
curl -H "Content-Type:application/json" -X POST -d '{"inputs": {}, "ref":"main"}' https://api.github.com/repos/yihong0618/2021/actions/workflows/4756004/dispatches -H "Authorization: token ${{ secrets.Z_S_T }}" | ||
- name: Push README | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.Z_S_J }} | ||
commit-message: "Refresh README" | ||
files: README.md | ||
github-token: ${{ secrets.Z_S_T }} | ||
commit-message: "Refresh README AND BACK UP" | ||
files: README.md BACKUP/ | ||
rebase: "true" | ||
name: simplefeel | ||
email: [email protected] | ||
name: ${{ env.GITHUB_NAME }} | ||
email: ${{ env.GITHUB_EMAIL }} |