Skip to content

Commit

Permalink
log in with SP credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 committed Apr 1, 2024
1 parent ac394ee commit 2633026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v3

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

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

Expand All @@ -28,12 +34,6 @@ jobs:
;;
esac

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

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

Expand Down
3 changes: 2 additions & 1 deletion scripts/ciauthenticate
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ CI authentication for this project.
}

curl -sL https://aka.ms/InstallAzureCLIDeb | bash
az acr login --name pcccr --username ${CLIENT_ID} --password ${CLIENT_SECRET}
az login --service-principal --username ${CLIENT_ID} --tenant "72f988bf-86f1-41af-91ab-2d7cd011db47" -password ${CLIENT_SECRET}
az acr login --name pcccr
docker login pcccr.azurecr.io --username ${CLIENT_ID} --password ${CLIENT_SECRET}

0 comments on commit 2633026

Please sign in to comment.