Skip to content

Commit

Permalink
Update gen_from_json.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
FerroO2000 authored Mar 13, 2024
1 parent 3546076 commit 7f57e3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/gen_from_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3
- name: Select JSON files
id: set-matrix
run: echo "matrix=$(find . | egrep '\.json$' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
run: echo "matrix=$(find $JSON_FILES_DIR | egrep '\.json$' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

sync-branch:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,16 +54,15 @@ jobs:
file=$(basename $path)
lcPath=${path,,}
lcFile=$(basename $lcPath)
dir=$(dirname $path)
echo "OUT_DIR=$(echo $dir)" >> $GITHUB_ENV
echo "FILENAME=$(echo $file)" >> $GITHUB_ENV
echo "DBC_FILE=$(echo ${{ env.ARTIFACT_DIR }})/$(echo $file).dbc" >> $GITHUB_ENV
echo "C_FILE=$(echo $lcFile).c" >> $GITHUB_ENV
echo "H_FILE=$(echo $lcFile).h" >> $GITHUB_ENV
echo "DBF_FILE=$(echo ${{ env.ARTIFACT_DIR }})/$(echo $file).dbf" >> $GITHUB_ENV
echo "XLSX_FILE=$(echo ${{ env.ARTIFACT_DIR }})/$(echo $file).xlsx" >> $GITHUB_ENV
echo "CSV_FILE=$(echo ${{ env.ARTIFACT_DIR }})/$(echo $file).csv" >> $GITHUB_ENV
- name: Print dir
run: ls -R
- name: Download latest jsodbc release
uses: robinraju/[email protected]
Expand Down Expand Up @@ -112,6 +111,9 @@ jobs:

- name: Convert dbc to csv
run: canconvert ${{ env.DBC_FILE }} ${{ env.CSV_FILE }}

- name: Print dir
run: ls -R

- name: Push to build branch
uses: s0/git-publish-subdir-action@develop
Expand All @@ -120,6 +122,6 @@ jobs:
BRANCH: build
FOLDER: ${{ env.ARTIFACT_DIR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_DIR: ${{ env.JSON_FILES_DIR }}/artifacts/${{ env.FILENAME }}
TARGET_DIR: ${{ env.OUT_DIR }}/artifacts/${{ env.FILENAME }}
SKIP_EMPTY_COMMITS: true
MESSAGE: generated from ${{ matrix.json-file }} at {sha}

0 comments on commit 7f57e3b

Please sign in to comment.