Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Reduced scope of id-token acquisition permission (#459)
Browse files Browse the repository at this point in the history
In accordance with the [GitHub Blog
Post](https://github.blog/changelog/2023-06-15-github-actions-securing-openid-connect-oidc-token-permissions-in-reusable-workflows),
the permission for acquiring an id token from GitHub
```
permissions:
  id-token: write
```
has been moved from the workflow context to the job requiring it for
logging into Azure using federated authentication
  • Loading branch information
ThorstenSauter committed Jun 18, 2023
1 parent a5a32ae commit f71f825
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:

workflow_dispatch:

permissions:
contents: read
id-token: write

env:
IMAGE_NAME: ${{ vars.REGISTRY_NAME }}.azurecr.io/${{ vars.IMAGE_NAME }}:${{ github.event.release.tag_name }}

Expand All @@ -19,6 +15,9 @@ jobs:
name: Promote container image for production
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
id-token: write
env:
SOURCE_IMAGE_NAME: ${{ vars.REGISTRY_NAME }}.azurecr.io/${{ vars.IMAGE_NAME }}:${{ github.sha }}
TARGET_IMAGE_NAME: ${{ vars.IMAGE_NAME }}:${{ github.event.release.tag_name }}
Expand Down

0 comments on commit f71f825

Please sign in to comment.