Skip to content

Commit e500c6a

Browse files
authored
Merge pull request #12078 from github/repo-sync
repo sync
2 parents 8b47bd6 + b9fbf6c commit e500c6a

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,36 +65,28 @@ The [`azure/login`](https://github.com/Azure/login) action receives a JWT from t
6565

6666
The following example exchanges an OIDC ID token with Azure to receive an access token, which can then be used to access cloud resources.
6767

68+
{% raw %}
6869
```yaml{:copy}
69-
name: Run Azure Login with OpenID Connect
70+
name: Run Azure Login with OIDC
7071
on: [push]
7172
7273
permissions:
7374
id-token: write
74-
75+
contents: read
7576
jobs:
7677
build-and-deploy:
7778
runs-on: ubuntu-latest
7879
steps:
79-
80-
- name: Installing CLI-beta for OpenID Connect
81-
run: |
82-
cd ../..
83-
CWD="$(pwd)"
84-
python3 -m venv oidc-venv
85-
. oidc-venv/bin/activate
86-
echo "activated environment"
87-
python3 -m pip install -q --upgrade pip
88-
echo "started installing cli beta"
89-
pip install -q --extra-index-url https://azcliprod.blob.core.windows.net/beta/simple/ azure-cli
90-
echo "***************installed cli beta*******************"
91-
echo "$CWD/oidc-venv/bin" >> $GITHUB_PATH
92-
93-
- name: 'Az CLI login'
94-
uses: azure/[email protected]
95-
with:
96-
client-id: {% raw %}${{ secrets.AZURE_CLIENTID }}{% endraw %}
97-
tenant-id: {% raw %}${{ secrets.AZURE_TENANTID }}{% endraw %}
98-
subscription-id: {% raw %}${{ secrets.AZURE_SUBSCRIPTIONID }}{% endraw %}
80+
- name: 'Az CLI login'
81+
uses: azure/login@v1
82+
with:
83+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
84+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
85+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
86+
87+
- name: 'Run az commands'
88+
run: |
89+
az account show
90+
az group list
9991
```
100-
92+
{% endraw %}

0 commit comments

Comments
 (0)