Skip to content

Commit

Permalink
Command with Double Quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcardus committed Aug 21, 2024
1 parent 99d67c9 commit 7a3fa70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
sed -i "s/\${GEOCODER_KEY}/${{secrets.GEOCODER_KEY}}/g" configuration/traccar.xml
ESCAPED_JSON=$(printf '%s' "${{ secrets.NOTIFICATOR_FIREBASE_SERVICE_ACCOUNT }}" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/$/\\n/g')
# Replace the placeholder with the escaped JSON content in the XML file
sed -i '/\${NOTIFICATOR_FIREBASE_SERVICE_ACCOUNT}/c<entry key="notificator.firebase.service.account">'"$ESCAPED_JSON"'</entry>' configuration/traccar.xml
sed -i "/\${NOTIFICATOR_FIREBASE_SERVICE_ACCOUNT}/c\<entry key=\"notificator.firebase.service.account\">${ESCAPED_JSON}</entry>" configuration/traccar.xml
cp -rv configuration/* setup/deploy
- name: ssh deploy
Expand Down

0 comments on commit 7a3fa70

Please sign in to comment.