Skip to content

Converting the original YAML files to JSON for the Datahub (created by wreints) #168

Converting the original YAML files to JSON for the Datahub (created by wreints)

Converting the original YAML files to JSON for the Datahub (created by wreints) #168

Workflow file for this run

name: YAML2JSON
run-name: "Converting the original YAML files to JSON for the Datahub (created by ${{ github.actor }})"
on: [push]
jobs:
convert-yaml-to-json:
runs-on: ubuntu-latest
steps:
- run: echo "Automatically triggered by a ${{ github.event_name }} event."
- run: echo "branch = ${{ github.ref }}; repository = ${{ github.repository }}"
- run: echo "workspace = ${{ github.workspace }}"
- name: Check out repository code (necessary - otherwise the workspace is empty)
uses: actions/checkout@v4
- name: List files in the repository
run: |
ls ${{ github.workspace }}/*
- run: rm -rv ${{ github.workspace }}/forKinsukAndSjors/*
- name: running python script
run: |
pip install tqdm
python ${{ github.workspace }}/scripts/process_yaml2json.py
- run: git diff-index HEAD
- name: pushing generated files back to repo
run: |
if git diff --exit-code; then
echo "NOTHING TO COMMIT!!!"
else
git config user.email "[email protected]"
git config user.name "valevo"
git add .
git commit -m "automated commit by GitHub Action defined in scripts/yaml_to_json.yml"
git push
fi
# if: ${{ git diff-index HEAD }}
- run: echo "🍏 This job's status is ${{ job.status }}."