Skip to content

Commit

Permalink
Hide output from 'az containerapp' commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacpayne committed Oct 10, 2023
1 parent 29cdfec commit a7e3cef
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ runs:
run: |
az group show \
-n ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-o none && CA_GH_ACTION_RG_EXISTS=true || CA_GH_ACTION_RG_EXISTS=false
--output none && CA_GH_ACTION_RG_EXISTS=true || CA_GH_ACTION_RG_EXISTS=false
echo "CA_GH_ACTION_RG_EXISTS=${CA_GH_ACTION_RG_EXISTS}" >> $GITHUB_ENV
- name: Get default location for Container Apps to use if resource group doesn't exist and location wasn't provided
Expand Down Expand Up @@ -344,7 +344,7 @@ runs:
az containerapp show \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-o none && CA_GH_ACTION_RESOURCE_EXISTS=true || CA_GH_ACTION_RESOURCE_EXISTS=false
--output && CA_GH_ACTION_RESOURCE_EXISTS=true || CA_GH_ACTION_RESOURCE_EXISTS=false
echo "CA_GH_ACTION_RESOURCE_EXISTS=${CA_GH_ACTION_RESOURCE_EXISTS}" >> $GITHUB_ENV
- name: Export environment to environment variable
Expand All @@ -368,7 +368,7 @@ runs:
az containerapp env show \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT }} \
-o none && CA_GH_ACTION_ENVIRONMENT_EXISTS=true || CA_GH_ACTION_ENVIRONMENT_EXISTS=false
--output none && CA_GH_ACTION_ENVIRONMENT_EXISTS=true || CA_GH_ACTION_ENVIRONMENT_EXISTS=false
echo "CA_GH_ACTION_ENVIRONMENT_EXISTS=${CA_GH_ACTION_ENVIRONMENT_EXISTS}" >> $GITHUB_ENV
- name: Reuse an existing Container App environment if found in the resource group
Expand Down Expand Up @@ -588,7 +588,8 @@ runs:
az containerapp create \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
--yaml ${{ inputs.yamlConfigPath }}
--yaml ${{ inputs.yamlConfigPath }} \
--output none
- name: Create the Container App from provided arguments
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'false' }}
Expand All @@ -602,7 +603,8 @@ runs:
${{ env.CA_GH_ACTION_INGRESS_ARG }} \
${{ env.CA_GH_ACTION_TARGET_PORT_ARG }} \
${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }}
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }} \
--output none
- name: Update the existing Container App from a YAML configuration file
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED == 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' }}
Expand All @@ -611,7 +613,8 @@ runs:
az containerapp update \
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
--yaml ${{ inputs.yamlConfigPath }}
--yaml ${{ inputs.yamlConfigPath }} \
--output none
- name: Determine whether or not 'update' or 'up' should be used
if: ${{ env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && (inputs.targetPort != '' || inputs.ingress != '') }}
Expand Down Expand Up @@ -639,7 +642,8 @@ runs:
-g ${{ env.CA_GH_ACTION_RESOURCE_GROUP }} \
-n ${{ inputs.containerAppName }} \
-i ${{ env.CA_GH_ACTION_IMAGE_TO_DEPLOY }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }}
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }} \
--output none
- name: Reset the ingress argument environment variable if it wasn't provided (use default ingress value)
if: ${{ inputs.ingress == '' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' && env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' }}
Expand All @@ -666,7 +670,8 @@ runs:
${{ env.CA_GH_ACTION_TARGET_PORT_ARG }} \
${{ env.CA_GH_ACTION_INGRESS_ARG }} \
${{ env.CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG }} \
${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG }}
${{ env.CA_GH_ACTION_REGISTRY_LOGIN_ARG }} \
--output none
- name: Disable ingress on the existing Container App
if: ${{ env.CA_GH_ACTION_RESOURCE_EXISTS == 'true' && inputs.ingress == 'disabled' && env.CA_GH_ACTION_YAML_PROVIDED != 'true' }}
Expand Down

0 comments on commit a7e3cef

Please sign in to comment.