Skip to content

Commit

Permalink
Revert "Revert "Update env var name to remove prod"" (#52711)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachmari authored Oct 17, 2024
1 parent e60be9e commit 91c395b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ jobs:

# Create a temporary token for the Azure Container Registry
# and set it as a GitHub Actions environment variable
# Then clean up by deleting the temp token.
# Created token are viewable in the ACR resource UI
# under Repository permissions > Tokens
- name: 'Create Azure Container Registry Token'
env:
PROD_REGISTRY_SERVER: ${{ secrets.PROD_REGISTRY_SERVER }}
CONTAINER_REGISTRY_SERVER: ${{ secrets.PROD_REGISTRY_SERVER }}
run: npm run create-acr-token

- name: 'Docker login'
Expand Down
4 changes: 2 additions & 2 deletions src/workflows/acr-create-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type IsoDateString = string
dotenv.config()

const acrTokenName = process.env.ACR_TOKEN_NAME
const acrProdRegistryServer = process.env.PROD_REGISTRY_SERVER
const acrServer = process.env.CONTAINER_REGISTRY_SERVER
const repo = process.env.GITHUB_REPOSITORY

function main() {
Expand All @@ -23,7 +23,7 @@ function main() {
try {
const cmd = `az acr token create \
--name ${acrTokenName} \
--registry ${acrProdRegistryServer} \
--registry ${acrServer} \
--repository ${repo} \
content/write \
content/read \
Expand Down

0 comments on commit 91c395b

Please sign in to comment.