Skip to content

Commit

Permalink
Update ACR login step in cli-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartleeks committed Oct 26, 2022
1 parent 7097bbf commit 1ff5e19
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/cli-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ name: cli-package
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
environment:
description: The environment to run this workflow in
type: environment
default: CICD
required: true

jobs:
build:
Expand All @@ -13,18 +20,19 @@ jobs:
- name: Checkout (GitHub)
uses: actions/checkout@v2

- name: Login to Container Registry
uses: docker/login-action@v1
if: github.ref == 'refs/heads/main'
- name: Azure Login
uses: azure/login@v1
with:
registry: ${{ secrets.ACTIONS_ACR_NAME }}.azurecr.io/
username: ${{ secrets.ACTIONS_ACR_NAME }}
password: ${{ secrets.ACTIONS_ACR_PASSWORD }}
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: ACR Login
id: ci_cache_cr_login
run: az acr login --name "${{ secrets.ACR_NAME }}"

- name: Build and run dev container task
uses: devcontainers/ci@v0.2
with:
imageName: ${{ secrets.ACTIONS_ACR_NAME }}.azurecr.io/tredev:latest
imageName: ${{ secrets.ACR_NAME }}.azurecr.io/tredev:latest
runCmd: |
# Validate installation and showing help output
cd cli
Expand All @@ -36,7 +44,7 @@ jobs:
- name: Build and run dev container task
uses: devcontainers/ci@v0.2
with:
imageName: ${{ secrets.ACTIONS_ACR_NAME }}.azurecr.io/tredev:latest
imageName: ${{ secrets.ACR_NAME }}.azurecr.io/tredev:latest
runCmd: |
# Create the python wheel
cd cli
Expand Down

0 comments on commit 1ff5e19

Please sign in to comment.