mirror of
https://github.com/wess09/AzurLaneAutoScript.git
synced 2026-05-14 06:58:22 +08:00
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Git over CDN 123pan
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
history:
|
|
description: "How many old commits to build packs for"
|
|
required: false
|
|
default: "1"
|
|
parent_file_id:
|
|
description: "123pan parent folder fileID, defaults to PAN123_PARENT_FILE_ID secret or azur folder"
|
|
required: false
|
|
default: ""
|
|
remote_prefix:
|
|
description: "Remote folder name under parent folder"
|
|
required: false
|
|
default: "AzurPilot_master"
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-upload:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: master
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Build git-over-cdn packs
|
|
run: |
|
|
uv run python .github/scripts/build_git_over_cdn.py \
|
|
--branch master \
|
|
--history "${{ github.event.inputs.history || '1' }}" \
|
|
--output dist/git-over-cdn
|
|
|
|
- name: Upload to 123pan
|
|
env:
|
|
PAN123_CLIENT_ID: ${{ secrets.PAN123_CLIENT_ID }}
|
|
PAN123_CLIENT_SECRET: ${{ secrets.PAN123_CLIENT_SECRET }}
|
|
PAN123_PARENT_FILE_ID_SECRET: ${{ secrets.PAN123_PARENT_FILE_ID }}
|
|
PAN123_PARENT_FILE_ID_INPUT: ${{ github.event.inputs.parent_file_id }}
|
|
PAN123_REMOTE_PREFIX_INPUT: ${{ github.event.inputs.remote_prefix }}
|
|
run: |
|
|
uv pip install --system requests
|
|
PAN123_PARENT_FILE_ID="${PAN123_PARENT_FILE_ID_INPUT:-${PAN123_PARENT_FILE_ID_SECRET:-31540282}}"
|
|
PAN123_REMOTE_PREFIX="${PAN123_REMOTE_PREFIX_INPUT:-AzurPilot_master}"
|
|
uv run python .github/scripts/upload_123pan.py \
|
|
--source dist/git-over-cdn \
|
|
--parent-file-id "$PAN123_PARENT_FILE_ID" \
|
|
--remote-prefix "$PAN123_REMOTE_PREFIX"
|
|
|
|
- name: Summary
|
|
run: |
|
|
echo "## git-over-cdn uploaded" >> "$GITHUB_STEP_SUMMARY"
|
|
echo "Files:" >> "$GITHUB_STEP_SUMMARY"
|
|
find dist/git-over-cdn -type f | sort >> "$GITHUB_STEP_SUMMARY"
|