read datajson input from environment variable

This commit is contained in:
amd64fox 2025-11-10 14:43:40 +03:00
parent 0b7ae2e90a
commit ea015c7280
2 changed files with 6 additions and 1 deletions

View file

@ -27,6 +27,8 @@ jobs:
python-version: 3.12.2
- name: Update versions.json
env:
DATA_JSON: ${{ github.event.inputs.datajson }}
run: |
python3 update_versions.py

View file

@ -1,7 +1,10 @@
import json
import re
import os
data_json = "${{ github.event.inputs.datajson }}"
data_json = os.environ.get("DATA_JSON")
if not data_json:
raise ValueError("DATA_JSON environment variable not set")
data = json.loads(data_json)
with open('versions.json', 'r') as f: