From 7f57e3ba2c69f08cefd5cd2e907058130c2c604c Mon Sep 17 00:00:00 2001 From: Omar Ferro <30318301+FerroO2000@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:23:12 +0100 Subject: [PATCH] Update gen_from_json.yml --- .github/workflows/gen_from_json.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gen_from_json.yml b/.github/workflows/gen_from_json.yml index 4d19baa..8d75d80 100644 --- a/.github/workflows/gen_from_json.yml +++ b/.github/workflows/gen_from_json.yml @@ -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 @@ -54,6 +54,8 @@ 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 @@ -61,9 +63,6 @@ jobs: 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/release-downloader@v1.8 @@ -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 @@ -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}