Update TestFilght Link Status #951
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: Update TestFilght Link Status | |
on: | |
schedule: | |
- cron: '0 3 * * *' | |
workflow_dispatch: | |
inputs: | |
python_version: | |
description: '指定 Python 版本 3.6+ (不建议修改)' | |
required: false | |
default: '3.11.1' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
if: github.repository == 'pluwen/awesome-testflight-link' | |
env: | |
python_version: ${{ github.event.inputs.python_version }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Check env | |
run: if [ -z "$python_version" ]; then python_version='3.11.1'; fi | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.python_version }} | |
architecture: x64 | |
- name: Init Python Env | |
run: pip install -r scripts/requirements.txt | |
- name: Update TestFilght Link Status | |
run: python scripts/update_status.py | |
- name: Git commit && push | |
run: | | |
git_diff=`git diff` | |
if [ -z "$git_diff" ]; then echo "Nothing Changed";exit; fi | |
git config --global user.email "[email protected]" | |
git config --global user.name "github_bot" | |
git add . | |
git commit -m "Github Action Auto Updated - `date`" | |
git push | |
forked-repo: | |
runs-on: ubuntu-latest | |
if: github.repository != 'pluwen/awesome-testflight-link' | |
steps: | |
- uses: actions/[email protected] | |
- name: Git commit && push | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "github_bot" | |
git remote add upstream https://github.com/pluwen/awesome-testflight-link.git | |
git fetch upstream | |
git checkout main | |
git merge upstream/main --allow-unrelated-histories | |
git push origin main | |