ci: 修复GitHub Actions权限和rebase问题
This commit is contained in:
1 parent
6135b6dcd5
commit
5eee9e5753
2 files changed
+6
No files matched your search
@@ -92,7 +92,11 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
git fetch origin main
|
git fetch origin main
|
||||||
|
# stash任何未提交的更改,避免rebase失败
|
||||||
|
git stash push -m "temp stash for rebase"
|
||||||
git rebase origin/main
|
git rebase origin/main
|
||||||
|
# 恢复stash的更改
|
||||||
|
git stash pop || true
|
||||||
if ! git log --oneline -1 | grep -q "\[skip ci\]"; then
|
if ! git log --oneline -1 | grep -q "\[skip ci\]"; then
|
||||||
echo "No auto-commits to push"
|
echo "No auto-commits to push"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ jobs:
|
|||||||
name: Subset Fonts
|
name: Subset Fonts
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
permissions:
|
||||||
|
contents: write # 添加写权限
|
||||||
|
|
||||||
# 只在主仓库上运行(fork不运行)
|
# 只在主仓库上运行(fork不运行)
|
||||||
if: github.repository == 'zqlit/blog'
|
if: github.repository == 'zqlit/blog'
|
||||||
|
|||||||
Reference in new issue
Block a user