From ddaf0a9c233e3bcdf4bcd6e809e211f5d4ebe169 Mon Sep 17 00:00:00 2001 From: Varun Sharma Date: Mon, 11 Jul 2022 10:12:14 -0700 Subject: [PATCH] ci: add GitHub token permissions for workflow Signed-off-by: Varun Sharma --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7053c200032..b62bbce59ca5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,14 @@ on: branches: - master +permissions: + contents: read + jobs: test: + permissions: + actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows + contents: read # for actions/checkout to fetch code name: "${{ matrix.root-pom }} on JDK ${{ matrix.java }}" strategy: matrix: @@ -68,6 +74,8 @@ jobs: run: ./util/deploy_snapshot.sh generate_docs: + permissions: + contents: write name: 'Generate latest docs' needs: test if: github.event_name == 'push' && github.repository == 'google/guava'