Skip to content

Commit

Permalink
fix yq query
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed May 24, 2024
1 parent 1efe26a commit c510205
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/deploy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ jobs:
uses: mikefarah/yq@master
with:
cmd: |
config=$(
# Set name with convention "{ENV_NAME}-{REPO_NAME}"
export name=${{ github.repository }}
name=${name#"ocadotechnology/codeforlife-"}
name="${{ github.ref_name }}-${name}"
# Set name with convention "{ENV_NAME}-{REPO_NAME}"
name=${{ github.repository }}
name=${name#"ocadotechnology/codeforlife-"}
name="${{ github.ref_name }}-${name}"
echo '
.service = "${name}"
' | envsubst
)
yq -i "$config" app.yaml
yq -i '
.service = "'$name'"
' app.yaml
- name: cat app yaml
run: cat app.yaml
Expand Down

0 comments on commit c510205

Please sign in to comment.