Skip to content

Commit

Permalink
Merge branch 'main' into joshi/performance-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 authored Apr 2, 2024
2 parents e7f1223 + f0ba6b7 commit a311b33
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Log in with Azure
uses: azure/login@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'

- name: Authenticate
env:
CLIENT_ID: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientId }}
CLIENT_SECRET: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientSecret }}
run: ./scripts/ciauthenticate

- name: Run cibuild
run: ./scripts/cibuild

Expand All @@ -28,14 +39,6 @@ jobs:
;;
esac

- name: Log into the ACR
env:
CLIENT_ID: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientId }}
CLIENT_SECRET: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientSecret }}
run:
docker login pcccr.azurecr.io --username ${CLIENT_ID} --password ${CLIENT_SECRET}
az acr login --name pcccr --username ${CLIENT_ID} --password ${CLIENT_SECRET}

- name: Publish images
run: ./scripts/cipublish --acr pcccr --tag ${{steps.get_image_tag.outputs.tag}}

Expand Down
19 changes: 19 additions & 0 deletions scripts/ciauthenticate
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

if [[ "${CI}" ]]; then
set -x
fi

function usage() {
echo -n \
"Usage: $(basename "$0")
CI authentication for this project.
"
}

# curl -sL https://aka.ms/InstallAzureCLIDeb | bash
# az login --service-principal --username ${CLIENT_ID} --tenant "microsoft.onmicrosoft.com" --password ${CLIENT_SECRET}
az acr login --name pcccr
docker login pcccr.azurecr.io --username ${CLIENT_ID} --password ${CLIENT_SECRET}

0 comments on commit a311b33

Please sign in to comment.