Skip to content

Commit

Permalink
added changes for secreless login (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
asaharn authored May 14, 2024
1 parent 6a11e2d commit 2afa225
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,25 @@ jobs:
distribution: 'adopt'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.APP_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: "Run az commands"
run: |
access_token=$(az account get-access-token --resource=${{ secrets.APP_ID }} --scope=${{ secrets.CLUSTER }}/.default --query accessToken -o tsv)
echo "ACCESS_TOKEN=$access_token" >> $GITHUB_ENV
- name: Run the Maven verify phase
run: mvn clean verify -DkustoAadAppId=${{ secrets.APP_ID }} -DkustoAadAuthorityID=${{ secrets.TENANT_ID }} -DkustoAadAppSecret=${{ secrets.APP_SECRET }} -DkustoDatabase=${{ secrets.DATABASE }} -DkustoCluster=${{ secrets.CLUSTER }}
env:
kustoAadAppId: ${{ secrets.APP_ID }}
kustoAadAuthorityID: ${{ secrets.TENANT_ID }}
kustoAadAppSecret: ${{ secrets.APP_SECRET }}
kustoDatabase: ${{ secrets.DATABASE }}
kustoCluster: ${{ secrets.CLUSTER }}
kustoAadAppId: ${{secrets.APP_ID}}
accessToken: ${{env.ACCESS_TOKEN}}
run: |
mvn clean verify -DkustoAadAppId=${{ secrets.APP_ID }} -DkustoAadAuthorityID=${{ secrets.TENANT_ID }} -DkustoDatabase=${{ secrets.DATABASE }} -DkustoCluster=${{ secrets.CLUSTER }} -DaccessToken=${{env.ACCESS_TOKEN}}
- name: Get versions
id: get_version
run: |
Expand Down

0 comments on commit 2afa225

Please sign in to comment.