GitHub: notify frontend about dataset update #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ${{ secrets.TOKEN_BSP_DB_NOTIFY_WEB }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/openeuler-riscv/imagepub-web/actions/workflows/build.yml/dispatches \ | |
-d '{"ref":"gh-action-setup"}' |