-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.52 KB
/
json_generation.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
name: Frontend JSON Generation
on:
push:
pull_request:
jobs:
generation:
runs-on: ubuntu-latest
container:
image: debian:stable-slim
steps:
- name: Setup dependencies
run: |
apt-get update && \
apt-get install --no-install-recommends -y \
python3 \
python3-venv \
python3-pip \
make \
rsync\
&& \
apt-get clean
- name: Checkout
uses: actions/checkout@v4
- name: Install python requirements
run: |
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
- name: Validate YAMLs
run: |
. venv/bin/activate
make -j$(nproc) validate
- name: Generate JSONs
run: |
. venv/bin/activate
make O=./build -j$(nproc)
- name: Archive JSONs
uses: actions/upload-artifact@v4
with:
name: frontend-dataset
path: build
notify_frontend:
runs-on: ubuntu-latest
needs: generation
permissions:
actions: write
steps:
- name: Notify
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secret.github_token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/openeuler-riscv/imagepub-web/actions/workflows/build.yml/dispatches \
-d '{"ref":"main"}'