-
-
Notifications
You must be signed in to change notification settings - Fork 166
59 lines (52 loc) · 1.82 KB
/
update_status.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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/checkout@v3.3.0
- name: Check env
run: if [ -z "$python_version" ]; then python_version='3.11.1'; fi
- name: Set up Python
uses: actions/setup-python@v4.5.0
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 "github_bot@noreply.github.com"
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/checkout@v3.3.0
- name: Git commit && push
run: |
git config --global user.email "github_bot@noreply.github.com"
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