read datajson input from environment variable
This commit is contained in:
parent
0b7ae2e90a
commit
ea015c7280
2 changed files with 6 additions and 1 deletions
2
.github/workflows/update_versions.yml
vendored
2
.github/workflows/update_versions.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue