mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
97 lines
2.9 KiB
YAML
97 lines
2.9 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '15 22 * * *' # 每天 06:15 UTC+8 自动构建
|
|
|
|
name: Daily
|
|
|
|
jobs:
|
|
generate_manifest:
|
|
name: Generate Manifest
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.repository, 'libnyanpasu')
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Install Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- uses: pnpm/action-setup@v5
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Install Deno
|
|
uses: denoland/setup-deno@v2
|
|
with:
|
|
deno-version: v2.x
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Generate Manifest
|
|
run: pnpm generate:manifest
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# if nothing changed, skip commit
|
|
- name: Check for changes
|
|
id: git-check
|
|
run: echo ::set-output name=has-changes::$(if git diff --quiet; then echo "false"; else echo "true"; fi)
|
|
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
|
if: steps.git-check.outputs.has-changes == 'true'
|
|
with:
|
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
name: 'github-actions[bot]'
|
|
email: '41898282+github-actions[bot]@users.noreply.github.com'
|
|
|
|
- name: Commit Manifest
|
|
if: steps.git-check.outputs.has-changes == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "chore(manifest): update manifest [skip ci]"
|
|
git push
|
|
generate_manifest_v1:
|
|
name: Generate Manifest V1
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.repository, 'libnyanpasu')
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: dev
|
|
- name: Install Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- uses: pnpm/action-setup@v5
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Install Deno
|
|
uses: denoland/setup-deno@v2
|
|
with:
|
|
deno-version: v2.x
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Generate Manifest
|
|
run: pnpm generate:manifest
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# if nothing changed, skip commit
|
|
- name: Check for changes
|
|
id: git-check
|
|
run: echo ::set-output name=has-changes::$(if git diff --quiet; then echo "false"; else echo "true"; fi)
|
|
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
|
if: steps.git-check.outputs.has-changes == 'true'
|
|
with:
|
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
name: 'github-actions[bot]'
|
|
email: '41898282+github-actions[bot]@users.noreply.github.com'
|
|
|
|
- name: Commit Manifest
|
|
if: steps.git-check.outputs.has-changes == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "chore(manifest): update manifest [skip ci]"
|
|
git push
|