diff --git a/.github/workflows/ephemeral-deploy.yaml b/.github/workflows/ephemeral-deploy.yaml index 54641e56..024b9eec 100644 --- a/.github/workflows/ephemeral-deploy.yaml +++ b/.github/workflows/ephemeral-deploy.yaml @@ -106,8 +106,8 @@ jobs: id: env-vars shell: bash run: | - ENVIRONMENT_VARIABLES=$(cat .env | tr "\n" " ") - TARGET_PORT=$(cat $(find . -iname "values.yaml") | grep "targetPort: " | awk -F ': ' '{print $2}' | uniq) + ENVIRONMENT_VARIABLES=$(tr "\n" " " < .env) + TARGET_PORT=$(find . -iname "values.yaml" -exec grep "targetPort: " {} \; | awk -F ': ' '{print $2}' | uniq) echo "targetPort=${TARGET_PORT}" >> $GITHUB_OUTPUT echo "environmentVariables=${ENVIRONMENT_VARIABLES}" >> $GITHUB_OUTPUT @@ -193,9 +193,9 @@ jobs: - name: Update Next URL variables if: contains(steps.env-vars.outputs.environmentVariables, 'BASE_URL') run: | - REPOSITORY_NAME=$(echo ${{ github.event.repository.name }} | awk -F '_' '{print $1}' | tr -d "-") + REPOSITORY_NAME="$(echo ${{ github.event.repository.name }} | awk -F '_' '{print $1}' | tr -d "-")" HOSTNAME="${{ steps.hostname.outputs.hostname }}" - az containerapp update -n ${{ needs.prepare.outputs.repositoryName }}-${{ needs.prepare.outputs.jiraTicketIdLc }} -g ${{ inputs.clusterResourceGroup }} --set-env-vars $(cat .env | grep -E "localhost|${REPOSITORY_NAME}.com" | awk -F '=' '{print $1}' | sed "s|$|=${HOSTNAME}|g") + az containerapp update -n "${{ needs.prepare.outputs.repositoryName }}-${{ needs.prepare.outputs.jiraTicketIdLc }}" -g "${{ inputs.clusterResourceGroup }}" --set-env-vars $(grep -E "localhost|${REPOSITORY_NAME}.com" .env | awk -F '=' '{print $1}' | sed "s|$|=${HOSTNAME}|g") destroy: name: Destroy Azure Container Instance