Skip to content

Commit e92a16f

Browse files
committed
format correctly
1 parent 7820232 commit e92a16f

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/azure-deploy-storybook.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ env:
3636
RESOURCE_GROUP: ${{ inputs.environment == 'production' && 'rg-designsystemet-prod' || 'rg-designsystemet-test' }}
3737
CONTAINERAPPS_ENV: ${{ inputs.environment == 'production' && 'storybook-prod-ca' || 'storybook-test-ca' }}
3838
ACR_NAME: designsystemetacr
39-
APP_NAME: ${{ inputs.environment == 'production' && 'storybook-prod' || storybook-test-pr-${{ inputs.pr_number }} }}
40-
IMAGE: ${{ github.event.number }}-${{ github.sha }}
39+
APP_NAME: ${{ inputs.environment == 'production' && 'storybook-prod' || format('storybook-test-pr-{0}', inputs.pr_number) }}
40+
IMAGE: ${{ inputs.pr_number && format('{0}-{1}', inputs.pr_number, github.sha) || format('{0}-{1}', github.run_id, github.sha) }}
4141
PORT: 8000
4242

4343
jobs:
@@ -70,15 +70,15 @@ jobs:
7070
- name: deploy
7171
uses: azure/container-apps-deploy-action@29ee19866ec987ededd70b8412d9ee241a9102d1 # v1
7272
with:
73-
resourceGroup: ${RESOURCE_GROUP}
73+
resourceGroup: ${{ RESOURCE_GROUP }}
7474
containerAppName: ${APP_NAME}
75-
containerAppEnvironment: ${CONTAINERAPPS_ENV}
76-
acrName: ${ACR_NAME}
77-
imageToDeploy: ${IMAGE}
78-
targetPort: ${PORT}
75+
containerAppEnvironment: ${{ CONTAINERAPPS_ENV }}
76+
acrName: ${{ ACR_NAME }}
77+
imageToDeploy: ${{ IMAGE }}
78+
targetPort: ${{ PORT }}
7979
ingress: external
8080
environmentVariables: |
81-
PORT=${PORT}
81+
PORT=${{ PORT }}
8282
HOST=0.0.0.0
8383
ENV=${{ inputs.environment }}
8484

.github/workflows/azure-deploy-themebuilder.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ env:
3636
RESOURCE_GROUP: ${{ inputs.environment == 'production' && 'rg-designsystemet-prod' || 'rg-designsystemet-test' }}
3737
CONTAINERAPPS_ENV: ${{ inputs.environment == 'production' && 'themebuilder-prod-ca' || 'themebuilder-test-ca' }}
3838
ACR_NAME: designsystemetacr
39-
APP_NAME: ${{ inputs.environment == 'production' && 'themebuilder-prod' || themebuilder-test-pr-${{ inputs.pr_number }} }}
40-
IMAGE: ${{ github.event.number }}-${{ github.sha }}
39+
APP_NAME: ${{ inputs.environment == 'production' && 'themebuilder-prod' || format('themebuilder-test-pr-{0}', inputs.pr_number) }}
40+
IMAGE: ${{ inputs.pr_number && format('{0}-{1}', inputs.pr_number, github.sha) || format('{0}-{1}', github.run_id, github.sha) }}
4141
PORT: 8000
4242

4343
jobs:
@@ -70,15 +70,15 @@ jobs:
7070
- name: deploy
7171
uses: azure/container-apps-deploy-action@29ee19866ec987ededd70b8412d9ee241a9102d1 # v1
7272
with:
73-
resourceGroup: ${RESOURCE_GROUP}
74-
containerAppName: ${APP_NAME}
75-
containerAppEnvironment: ${CONTAINERAPPS_ENV}
76-
acrName: ${ACR_NAME}
77-
imageToDeploy: ${IMAGE}
78-
targetPort: ${PORT}
73+
resourceGroup: ${{ RESOURCE_GROUP }}
74+
containerAppName: ${{ APP_NAME }}
75+
containerAppEnvironment: ${{ CONTAINERAPPS_ENV }}
76+
acrName: ${{ ACR_NAME }}
77+
imageToDeploy: ${{ IMAGE }}
78+
targetPort: ${{ PORT }}
7979
ingress: external
8080
environmentVariables: |
81-
PORT=${PORT}
81+
PORT=${{ PORT }}
8282
HOST=0.0.0.0
8383
ENV=${{ inputs.environment }}
8484

.github/workflows/azure-deploy-www.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ env:
3636
RESOURCE_GROUP: ${{ inputs.environment == 'production' && 'rg-designsystemet-prod' || 'rg-designsystemet-test' }}
3737
CONTAINERAPPS_ENV: ${{ inputs.environment == 'production' && 'www-prod-ca' || 'www-test-ca' }}
3838
ACR_NAME: designsystemetacr
39-
APP_NAME: ${{ inputs.environment == 'production' && 'www-prod' || www-test-pr-${{ inputs.pr_number }} }}
40-
IMAGE: ${{ github.event.number }}-${{ github.sha }}
39+
APP_NAME: ${{ inputs.environment == 'production' && 'www-prod' || format('www-test-pr-{0}', inputs.pr_number) }}
40+
IMAGE: ${{ inputs.pr_number && format('{0}-{1}', inputs.pr_number, github.sha) || format('{0}-{1}', github.run_id, github.sha) }}
4141
PORT: 8000
4242

4343
jobs:
@@ -72,12 +72,12 @@ jobs:
7272
- name: deploy
7373
uses: azure/container-apps-deploy-action@29ee19866ec987ededd70b8412d9ee241a9102d1 # v1
7474
with:
75-
resourceGroup: ${RESOURCE_GROUP}
76-
containerAppName: ${APP_NAME}
77-
containerAppEnvironment: ${CONTAINERAPPS_ENV}
78-
acrName: ${ACR_NAME}
79-
imageToDeploy: ${IMAGE}
80-
targetPort: ${PORT}
75+
resourceGroup: ${{ RESOURCE_GROUP }}
76+
containerAppName: ${{ APP_NAME }}
77+
containerAppEnvironment: ${{ CONTAINERAPPS_ENV }}
78+
acrName: ${{ ACR_NAME }}
79+
imageToDeploy: ${{ IMAGE }}
80+
targetPort: ${{ PORT }}
8181
ingress: external
8282
environmentVariables: |
8383
PORT=${PORT}

0 commit comments

Comments
 (0)