Skip to content

Commit e16ca45

Browse files
authored
Merge pull request #5 from Spark0618/Spark0618-wp
change push_wp.yml
2 parents 5969da1 + 1a1a06a commit e16ca45

File tree

9 files changed

+12
-3
lines changed

9 files changed

+12
-3
lines changed

.github/workflows/push_wp.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Get added files
2222
run: |
2323
# 先合并所有 commit 的 added
24-
FILES=$(jq -c '[.commits[].added[]]' <<< '${{ toJson(github.event) }}')
24+
FILES=$(jq -c '[.commits[] | (.added // [])[]]' <<< '${{ toJson(github.event) }}')
2525
echo "COMMIT_FILES=$FILES" >> $GITHUB_ENV
2626
- name: Update schedule JSON
2727
env:
@@ -34,6 +34,9 @@ jobs:
3434
run: |
3535
git config user.name "github-actions[bot]"
3636
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
37+
git stash
38+
git pull --rebase https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} main
39+
git stash pop
3740
git add docs/data/calendar.json
3841
git commit -m "Update calendar from push" || echo "No changes"
3942
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:main

docs/ai/placeholder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file will be deleted soon.

docs/crypto/placeholder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file will be deleted soon.

docs/misc/placeholder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file will be deleted soon.

docs/pwn/placeholder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file will be deleted soon.

docs/reverse/placeholder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file will be deleted soon.

members.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["Alice", "Bob", "Charlie", "Diana"]
1+
["Spark0618", "yao-luan", "cinansu", "chengxuan706", "sunhao-has", "HuajiHD", "Oscoosky", "Kevincatpink", "Wuu-619", "LyqPurple"]

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ strict: false
66
# Repository
77
repo_name: 'CTF-USTB/Panic404-wp'
88
repo_url: 'https://github.com/CTF-USTB/Panic404-wp'
9+
edit_uri: edit/main/docs/
910
#edit_uri: 'https://'
1011

1112
# Copyright

scripts/update_calendar_on_push.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# 获取本次 push 改动的文件列表(md 文件)
1010
files_env = os.environ.get('COMMIT_FILES', '[]')
1111
try:
12-
files_nested = ast.literal_eval(files_env)
12+
files_nested = json.loads(files_env)
1313
except Exception:
1414
files_nested = []
1515
# 拉平成一维

0 commit comments

Comments
 (0)