-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (58 loc) · 2.33 KB
/
schedule.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
59
60
61
62
63
64
65
66
on:
workflow_dispatch:
release:
types: [published]
push:
branches: ["main"]
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4 # checkout the repository content to github runner.
with:
ref: main
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.12 #install the python needed
- name: install python packages
run: |
pip install PyGithub pandas mistletoe lxml beautifulsoup4
- name: execute py script # run the run.py to get the latest data
env:
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }}
GITHUB_TOKEN: ${{ github.token }}
run: |
python generate_json.py -t ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
env:
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }}
GITHUB_TOKEN: ${{ github.token }}
with:
commit_message: Automated Change
# Optional. Options used by `git-commit`.
# See https://git-scm.com/docs/git-commit#_options
commit_options: '--no-verify --signoff'
file_pattern: 'apps.json apps_esign.json bundleId.csv icons/*'
# Optional commit user and author settings
commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
commit_author: Author <[email protected]> # defaults to author of the commit that triggered the run
push_options: '--force'
# - name: commit files
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git add -A
# git commit -m "update apps.json" -a
# - name: push changes
# uses: ad-m/[email protected]
# with:
# github_token: ${{ secrets.SECRET_NAME }}
# branch: main