Azure / functions-action

Enable GitHub developers to deploy to Azure Function Apps using GitHub Actions
MIT License
152 stars 75 forks source link

Permissions Issue with GitHub Action - Private Repository, Action Created from Azure Portal (Function App) #235

Closed Whats-A-MattR closed 3 months ago

Whats-A-MattR commented 3 months ago

Issue found and resolved when using the Azure Portal to configure CI/CD pipeline.

The workflow file created by this process uses a permission claim for id-token of write, which is fine, however no other permissions are set. The issue with this, is that if you declare one the rest are set to none unless declared otherwise.

If you specify the access for any of these scopes, all of those that are not specified are set to none. Source: Github Actions Documentation

To resolve the issue faced, I had to add contents: read to the permissions: block, allowing the action to checkout the repository.

Whats-A-MattR commented 3 months ago

Found the repo where I think this issue actually came from. I have raised a PR to add out of the box compatibility for Private Repositories.