Skip to content

Commit 6ec1343

Browse files
committed
fix: move env vars to job level for environment context
1 parent ee861e2 commit 6ec1343

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/_purge_cdn.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ on:
88
endpoint:
99
type: string
1010
default: artefacts
11-
# Because of limitations in how to set environment context when calling reusable workflows,
12-
# we are using ENV variables directly in this one. Not pretty, but it works.
13-
env:
14-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
15-
AZURE_CDN_PROFILE_NAME: ${{ vars.AZURE_CDN_PROFILE_NAME }}
16-
AZURE_CDN_ENDPOINT_NAME: ${{ vars.AZURE_CDN_ENDPOINT_NAME }}
17-
AZURE_STORYBOOK_ENDPOINT_NAME: ${{ vars.AZURE_STORYBOOK_ENDPOINT_NAME }}
18-
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
1911
jobs:
2012
purge:
2113
name: Purge the cdn to refresh cache
2214
runs-on: ubuntu-latest
2315
environment: ${{ inputs.environment }}
16+
env:
17+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
18+
AZURE_CDN_PROFILE_NAME: ${{ vars.AZURE_CDN_PROFILE_NAME }}
19+
AZURE_CDN_ENDPOINT_NAME: ${{ vars.AZURE_CDN_ENDPOINT_NAME }}
20+
AZURE_STORYBOOK_ENDPOINT_NAME: ${{ vars.AZURE_STORYBOOK_ENDPOINT_NAME }}
21+
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
2422
steps:
2523
- name: Az CLI login 🔑 # Using federated credential
2624
uses: azure/login@v1

0 commit comments

Comments
 (0)