Skip to content

Commit

Permalink
fix: 密码转义
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Aug 16, 2024
1 parent 10499e2 commit e5802ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/cron_bypassCF.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: bypassCF cron (use this)

name: bypassCF cron (使用这个)
# GitHub.secrets优先级最高,即使没有设置对应的变量,它也会读取,这时变量为空值,导致报错,.env读取的变量无法覆盖这个值
on:
schedule:
# 每天 UTC 时间 18:00 运行
Expand Down Expand Up @@ -57,9 +57,11 @@ jobs:
if [ -n "${{ secrets.PASSWORDS }}" ] && [ ! -z "${{ secrets.PASSWORDS }}" ]; then
echo "Using GitHub Secret for PASSWORDS"
echo "PASSWORDS=\"${{ secrets.PASSWORDS }}\"" >> $GITHUB_ENV
PASSWORD_ESCAPED="${{ secrets.PASSWORDS }}" && PASSWORD_ESCAPED=${PASSWORD_ESCAPED//\#/\\#}
echo "PASSWORDS=$PASSWORD_ESCAPED" >> $GITHUB_ENV
else
echo "PASSWORDS=\"${PASSWORDS}\"" >> $GITHUB_ENV
PASSWORD_ESCAPED="${PASSWORDS}" && PASSWORD_ESCAPED=${PASSWORD_ESCAPED//\#/\\#}
echo "PASSWORDS=$PASSWORD_ESCAPED" >> $GITHUB_ENV
fi
if [ -n "${{ secrets.WEBSITE }}" ] && [ ! -z "${{ secrets.WEBSITE }}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron_read.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: read cron (don't use)
name: read cron (暂时不使用)

on:
schedule:
Expand Down

0 comments on commit e5802ab

Please sign in to comment.