Skip to content

Commit

Permalink
Resolve shellcheck SC2002 and SC2046 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ebronson68 committed Oct 9, 2023
1 parent c1b7999 commit 99aed93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ephemeral-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 99aed93

Please sign in to comment.