Skip to content

Commit

Permalink
update sed command
Browse files Browse the repository at this point in the history
  • Loading branch information
cru-Luis-Rodriguez committed Oct 25, 2024
1 parent 6c563d3 commit e39c6d6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build-deploy-cloudrun-function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,7 @@ jobs:

- name: Preprocess Config File
run: |
#!/bin/bash
# Replace placeholders with actual values
sed -e "s/\${FUNCTION_NAME}/${{ inputs.function_name }}/g" \
-e "s/\${GCP_REGION}/${{ secrets.GCP_REGION }}/g" \
-e "s/\${GCP_PROJECT_ID}/${{ secrets.GCP_PROJECT_ID }}/g" \
-e "s/\${GCP_SERVICE_ACCOUNT_EMAIL}/${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}/g" \
-e "s/\${RUN_SERVICE_ACCOUNT}/${{ secrets.RUN_SERVICE_ACCOUNT }}/g" \
function_config_template.json > function_config.json
run: sed -e 's/\${FUNCTION_NAME}/${{ inputs.function_name }}/g; s/\${GCP_REGION}/${{ secrets.GCP_REGION }}/g; s/\${GCP_PROJECT_ID}/${{ secrets.GCP_PROJECT_ID }}/g; s/\${GCP_SERVICE_ACCOUNT_EMAIL}/${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}/g; s/\${RUN_SERVICE_ACCOUNT}/${{ secrets.RUN_SERVICE_ACCOUNT }}/g' function_config_template.json > function_config.json
- name: Verify Config File
run: cat function_config.json
Expand Down

0 comments on commit e39c6d6

Please sign in to comment.