Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: jq not around use tsv #954

Merged
merged 3 commits into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/build-and-deploy-static-web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: azure/CLI@v2
with:
azcliversion: 2.63.0 # pinning because https://github.com/Azure/cli/issues/165
inlineScript: |
az version
az bicep install
Expand Down Expand Up @@ -88,6 +89,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: azure/CLI@v2
with:
azcliversion: 2.63.0 # pinning because https://github.com/Azure/cli/issues/165
inlineScript: |
az deployment group what-if \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
Expand Down Expand Up @@ -180,8 +182,10 @@ jobs:
id: static_web_app_apikey
uses: azure/CLI@v2
with:
azcliversion: 2.63.0 # pinning because https://github.com/Azure/cli/issues/165
inlineScript: |
APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.properties.apiKey')
# APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.properties.apiKey')
APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' --query properties.apiKey -o tsv)
echo "APIKEY=$APIKEY" >> $GITHUB_OUTPUT

- name: Deploy site 🚀
Expand Down Expand Up @@ -213,8 +217,10 @@ jobs:
id: static_web_app_preview_url
uses: azure/CLI@v2
with:
azcliversion: 2.63.0 # pinning because https://github.com/Azure/cli/issues/165
inlineScript: |
DEFAULTHOSTNAME=$(az staticwebapp show -n '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.defaultHostname')
# DEFAULTHOSTNAME=$(az staticwebapp show -n '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.defaultHostname')
DEFAULTHOSTNAME=$(az staticwebapp show -n '${{ env.STATIC_WEB_APP_NAME }}' --query defaultHostname -o tsv)

PREVIEW_URL="https://${DEFAULTHOSTNAME/.[1-9]./-${{github.event.pull_request.number }}.${{ env.AZURE_LOCATION }}.1.}"

Expand Down Expand Up @@ -410,8 +416,10 @@ jobs:
id: apikey
uses: azure/CLI@v2
with:
azcliversion: 2.63.0 # pinning because https://github.com/Azure/cli/issues/165
inlineScript: |
APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.properties.apiKey')
# APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' | jq -r '.properties.apiKey')
APIKEY=$(az staticwebapp secrets list --name '${{ env.STATIC_WEB_APP_NAME }}' --query properties.apiKey -o tsv)
echo "APIKEY=$APIKEY" >> $GITHUB_OUTPUT

- name: Destroy staging environment 💥
Expand Down
Loading