-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (45 loc) · 1.54 KB
/
update_json.yml
File metadata and controls
53 lines (45 loc) · 1.54 KB
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
name: Update JSON and Create PR
on:
schedule:
# Run the workflow every day at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-json:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: |
pip install -e .
- name: Update JSON file
env:
MYSQL_HOST: ${{ vars.MYSQL_HOST }}
MYSQL_DATABASE_NAME: ${{ vars.MYSQL_DATABASE_NAME }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
run: |
postprocess
visualization
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-json-file # Branch to create the PR from
base: main # Branch to create the PR into
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
title: "Automated PR: Update JSON file"
body: "This PR was automatically created by GitHub Actions to update the JSON file."
reviewers: anyangml