Merge pull request #64 from SpenserCai/dev #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Intersvc Support List | |
# 支持手动触发 | |
on: | |
workflow_dispatch: | |
inputs: | |
action: | |
description: 'Action to execute' | |
required: true | |
default: 'Check Intersvc Support List' | |
push: | |
branches: | |
- main | |
jobs: | |
check_intersvc_support_list: | |
runs-on: ubuntu-latest # 选择适合你的操作系统环境 | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.12 | |
- name: Run script | |
id: run_script | |
run: | | |
python3 .github/scripts/gen_intersvc_support_list.py >> list.md | |
echo "SP_LIST=$(cat list.md | base64 -w 0)" >> $GITHUB_OUTPUT | |
- name: Checkout Wiki | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }}.wiki | |
- run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
# 把SP_LIST的内容写入到Intersvc-Support-List.md中 | |
echo "${{ env.SP_LIST }}" | base64 -d > ./Intersvc-Support-List.md | |
# 如果没有变动,不需要提交 | |
git diff --exit-code --quiet || git commit -am "Update Support List" | |
git push | |
env: | |
SP_LIST: ${{ steps.run_script.outputs.SP_LIST }} |