Skip to content

Commit

Permalink
Merge pull request #52637 from github/revert-52356-acr-login-with-token
Browse files Browse the repository at this point in the history
Revert "token-based auth for azure container registry"
  • Loading branch information
rachmari authored Oct 11, 2024
2 parents 7c4497d + 2ca5d52 commit 74b7ab9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 77 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,23 @@ jobs:
RESOURCE_GROUP_NAME: docs-prod
APP_SERVICE_NAME: ghdocs-prod
SLOT_NAME: canary
ACR_TOKEN_NAME: acrToken

steps:
- name: 'Az CLI login'
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # pin @v2
with:
creds: ${{ secrets.PROD_AZURE_CREDENTIALS }}

- name: 'Docker login'
uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c
with:
login-server: ${{ secrets.PROD_REGISTRY_SERVER }}
username: ${{ secrets.PROD_REGISTRY_USERNAME }}
password: ${{ secrets.PROD_REGISTRY_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db

- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand All @@ -55,30 +64,11 @@ jobs:
node-version-file: 'package.json'
cache: npm

# We need this to run a few scripts that were easier to write in JS/TS
# Currently we only need this to run dependencies in
# src/workflows/check-canary-slots.js
- name: Install dependencies
run: npm install

# 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 }}
run: npm run create-acr-token

- name: 'Docker login'
uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c
with:
login-server: ${{ secrets.PROD_REGISTRY_SERVER }}
username: ${{ env.ACR_TOKEN_NAME }}
password: ${{ env.ACR_TOKEN_VALUE }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db

- name: Clone docs-early-access
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"content-changes-table-comment": "tsx src/workflows/content-changes-table-comment.ts",
"copy-fixture-data": "node src/tests/scripts/copy-fixture-data.js",
"count-translation-corruptions": "tsx src/languages/scripts/count-translation-corruptions.ts",
"create-acr-token": "tsx src/workflows/acr-create-token.js",
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.ts",
"delete-orphan-translation-files": "tsx src/workflows/delete-orphan-translation-files.ts",
"deleted-features-pr-comment": "tsx src/data-directory/scripts/deleted-features-pr-comment.ts",
Expand Down
54 changes: 0 additions & 54 deletions src/workflows/acr-create-token.ts

This file was deleted.

0 comments on commit 74b7ab9

Please sign in to comment.