Added token permission for deployments/azure-staticwebapp.yml

This commit is contained in:
h0x0er
2022-02-04 10:42:13 +05:30
committed by GitHub
parent de41169eb0
commit 5d03c86e26
+8
View File
@@ -28,8 +28,14 @@ env:
APP_ARTIFACT_LOCATION: "build" # location of client code build output
AZURE_STATIC_WEB_APPS_API_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing deployment token for your static web app
permissions:
contents: read
jobs:
build_and_deploy_job:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for Azure/static-web-apps-deploy to comment on PRs
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
@@ -52,6 +58,8 @@ jobs:
###### End of Repository/Build Configurations ######
close_pull_request_job:
permissions:
contents: none
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job