mirror of
https://github.com/YuCat-OVO/BaiduNetdisk-Docker
synced 2025-05-10 20:10:04 +08:00
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: Get BaiduNetdisk Version
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 3 * * 0"
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- "get_version.py"
|
|
|
|
jobs:
|
|
get-version:
|
|
name: Get BaiduNetdisk Version
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set variables
|
|
id: set-vars
|
|
run: |
|
|
RELEASE_NAME="Released on $(date +%Y%m%d%H%M)"
|
|
|
|
echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11.7"
|
|
|
|
- name: Run Script
|
|
run: |
|
|
pip install -r requirements.txt
|
|
python get_version.py
|
|
|
|
- name: Git push assets to branch
|
|
run: |
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add *.json
|
|
git commit -m "${{ steps.set-vars.outputs.RELEASE_NAME }}"
|
|
git push
|