Skip to content

Commit

Permalink
github-actions: use github secrets for azure (#2375)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 13, 2024
1 parent 7286c2f commit fccf2df
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,18 @@ jobs:
#if: |
# github.event_name != 'pull_request'
# || github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap
with:
azure: 'true'

- name: 'Read credentials'
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
method: approle
secrets: |
secret/apm-team/ci/apm-agent-dotnet-azure client_id | ARM_CLIENT_ID ;
secret/apm-team/ci/apm-agent-dotnet-azure client_secret | ARM_CLIENT_SECRET ;
secret/apm-team/ci/apm-agent-dotnet-azure subscription_id | ARM_SUBSCRIPTION_ID ;
secret/apm-team/ci/apm-agent-dotnet-azure tenant_id | ARM_TENANT_ID
- name: 'Login to Azure'
run: |
az login --service-principal --username ${{ env.ARM_CLIENT_ID }} --password ${{ env.ARM_CLIENT_SECRET }} --tenant ${{ env.ARM_TENANT_ID }}
Expand Down

0 comments on commit fccf2df

Please sign in to comment.