Skip to content

Commit

Permalink
update build_book workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRichi3 committed May 12, 2024
1 parent 6eafb8c commit a3aab64
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/build_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,25 @@ jobs:
id: read_config
run: |
JSON_FILE="$CONFIG_PATH"
if [ -f "JSON_FILE" ]; then
echo "CONFIG_PATH=$CONFIG_PATH"
JSON_CONTENT=$(cat "$JSON_FILE")
# JSON_CONTENT="${JSON_CONTENT//'%'/'%25'}"
# JSON_CONTENT="${JSON_CONTENT//$'\n'/'%0A'}"
# JSON_CONTENT="${JSON_CONTENT//$'\r'/'%0D'}"
echo "LANGUAGES=${JSON_CONTENT.languages}" >> $GITHUB_ENV
echo "::set-output name=JSON_CONTENT::$JSON_CONTENT";
else
echo "JSON file not found at $CONFIG_PATH"
exit 1
fi
JSON_CONTENT=$(cat "$JSON_FILE")
# JSON_CONTENT="${JSON_CONTENT//'%'/'%25'}"
# JSON_CONTENT="${JSON_CONTENT//$'\n'/'%0A'}"
# JSON_CONTENT="${JSON_CONTENT//$'\r'/'%0D'}"
echo "LANGUAGES=${JSON_CONTENT.languages}" >> $GITHUB_ENV
echo "::set-output name=JSON_CONTENT::$JSON_CONTENT";
JSON_FILE="$CONFIG_PATH"
# if [ -f "JSON_FILE" ]; then
# echo "CONFIG_PATH=$CONFIG_PATH"
# JSON_CONTENT=$(cat "$JSON_FILE")
# # JSON_CONTENT="${JSON_CONTENT//'%'/'%25'}"
# # JSON_CONTENT="${JSON_CONTENT//$'\n'/'%0A'}"
# # JSON_CONTENT="${JSON_CONTENT//$'\r'/'%0D'}"
# echo "LANGUAGES=${JSON_CONTENT.languages}" >> $GITHUB_ENV
# echo "::set-output name=JSON_CONTENT::$JSON_CONTENT";
# else
# echo "JSON file not found at $CONFIG_PATH"
# exit 1
# fi
- name: Use CONFIG variables from file
run: |
Expand Down

0 comments on commit a3aab64

Please sign in to comment.