From 627ddd2f70b6787fe684b22923bed426dc6e633d Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Sun, 18 Aug 2024 19:07:18 -0700 Subject: [PATCH 1/2] Fix: OpenAPI lint workflow trigger --- .github/workflows/lint-openapi.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-openapi.yml b/.github/workflows/lint-openapi.yml index 3c6072d8..d62d3e9d 100644 --- a/.github/workflows/lint-openapi.yml +++ b/.github/workflows/lint-openapi.yml @@ -1,13 +1,11 @@ name: API linting -# Run on pull requests or pushes when there is a change to the OpenAPI file +# Run on pull requests or pushes when there is a change to any OpenAPI files in docs/ on: + pull_request: push: paths: - - docs/ - pull_request: - paths: - - docs/ + - 'docs/**' jobs: build: From 9674cfd2586d4108f8e920571f869c9b1db7e140 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Sun, 18 Aug 2024 19:08:04 -0700 Subject: [PATCH 2/2] Add: explicit permissions for OpenAPI linting workflow --- .github/workflows/lint-openapi.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint-openapi.yml b/.github/workflows/lint-openapi.yml index d62d3e9d..817e94b9 100644 --- a/.github/workflows/lint-openapi.yml +++ b/.github/workflows/lint-openapi.yml @@ -7,6 +7,10 @@ on: paths: - 'docs/**' +# This action only needs read permissions +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest