Skip to content

Stage

Stage #26537

Workflow file for this run

name: Stage
on:
workflow_dispatch:
push:
branches:
- main
paths:
- plugins.txt
- themes.txt
- icons.txt
- templates.txt
- widgets.txt
schedule:
- cron: '0 * * * *'
concurrency:
group: stage
cancel-in-progress: false
jobs:
build:
if: ${{ github.repository_owner == 'siyuan-note' }}
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_AK: ${{ secrets.QINIU_AK }}
QINIU_SK: ${{ secrets.QINIU_SK }}
RHYTHEM_TOKEN: ${{ secrets.RHYTHEM_TOKEN }}
steps:
- name: Check out repo
uses: actions/checkout@v6
- name: Setup Golang
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Go staging
# env:
# STAGE_POOL_SIZE: 80 # 总并发数,多数 skip 时加快检查
# STAGE_HEAVY_CONCURRENCY: 8 # 同时下载+上传的仓库数,避免打满 GitHub/OSS
run: go run ./actions/stage
- name: Commit and push
id: commit_push
run: |-
git config --global user.email "bot@github.com" && git config --global user.name "Bot"
git add .
git diff --cached --quiet && echo "had_changes=false" >> $GITHUB_OUTPUT || echo "had_changes=true" >> $GITHUB_OUTPUT
git diff --cached --stat
git commit -m ":bookmark: Staging" || exit 0
git pull --rebase
git push
- name: Index bazaar and report hash
if: steps.commit_push.outputs.had_changes == 'true'
run: go run ./actions/index