push.yml: upload_metadata: download prebuilt artifacts, generate jsons, upload them as metadata.zip - Work in Progress

This commit is contained in:
Ivan Zorin
2023-12-20 04:42:27 +03:00
parent a290735d44
commit 1dbbd24bbc

View File

@@ -72,6 +72,7 @@ jobs:
steps:
- name: Install dependencies (apk)
run: apk add --no-cache gcc-riscv-none-elf newlib-riscv-none-elf findutils python3 py3-pip make git bash musl-dev
- name: Install dependencies (python)
run: python3 -m pip install bdflib
@@ -117,21 +118,46 @@ jobs:
upload_metadata:
needs: [build, build_multi-lang]
runs-on: ubuntu-20.04
steps:
container:
image: alpine:3.16
strategy:
matrix:
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101", "Pinecil_multi-lang", "Pinecilv2_multi-lang"]
fail-fast: true
- name: Download All JSONs
steps:
- name: Install dependencies (apk)
run: apk add --no-cache findutils python3 py3-pip make git bash
- name: Install dependencies (python)
run: python3 -m pip install bdflib
- uses: actions/checkout@v4
with:
submodules: true
- name: Git ownership exception
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
- name: Download all prebuilts
uses: actions/download-artifact@v4
with:
path: metadata
pattern: .metadata-*
path: source/Hexfile/
pattern: *
merge-multiple: true
- run: ls -R metadata
- run: ls -R source/Hexfile
- name: Re-upload JSONs in bulk
- name: Generate JSON files
run: ./source/metadata.py ${{ matrix.model }}.json
- name: Upload JSONs in bulk as metadata
uses: actions/upload-artifact@v4
with:
name: metadata
path: metadata/*
path: source/Hexfile/*.json
if-no-files-found: error