backtrace/.github/workflows/build.yml
spiritlhl 16e551b631
Some checks failed
CI / test (push) Waiting to run
Sync ASN metadata / sync (push) Has been cancelled
feat(dns): prepare backtrace v0.0.21
2026-08-26 15:37:44 +08:00

44 lines
1.1 KiB
YAML

name: 创建IPv6检测的前缀
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
concurrency:
group: backtrace-ipv6-prefix-sync
cancel-in-progress: false
permissions:
contents: write
jobs:
fetch-ipv6-prefixes:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 设置 Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: 获取并处理多个ASN的IPv6前缀
run: |
go run ./cmd/update-prefixes -output-dir bk/prefix
- name: 提交更新到仓库
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add bk/prefix/*.txt bk/prefix/*.txt.manifest.json
if git diff --cached --quiet; then
echo "无变更,跳过提交。"
else
git commit -m "chore: 更新多个 ASN 的 IPv6 前缀"
git push
fi