-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (48 loc) · 1.51 KB
/
build_manifest_all.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
name: Run JSON Concatenation Script and Commit Result
# Controls when the workflow will run
on:
schedule:
# Runs at 00:00 and 12:00 UTC every day
- cron: '0 0,12 * * *'
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# The jobs that will run
jobs:
run-script:
runs-on: ubuntu-latest
steps:
# Check out the repository containing the script
- name: Check out the repository
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify your Python version
# Install required dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests jsonschema
# Run the Python script
- name: Run the JSON concatenation script
run: python build_manifest_all.py
# Configure Git
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Commit the changes if there are any
- name: Commit changes
run: |
git add .
git diff-index --quiet HEAD || git commit -m "Update manifest_all.json"
# Push changes back to the repository
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push