From d7e2229b41748e84f525ee44cee19be81382ceab Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 15 Jan 2022 21:02:42 -0500 Subject: [PATCH 1/2] ci(commitlint): use pull_request_target to avoid "skip ci" --- .github/workflows/commitlint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 6c74ec99d3..5044b7dcab 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -1,13 +1,13 @@ name: "Commit Linter" on: - pull_request: + # Only pull_request and push honor [skip ci]. Since this workflow must pass + # to merge a PR, it can't be skipped, so use pull_request_target + pull_request_target: types: [opened, synchronize, reopened, ready_for_review] jobs: lint-commits: runs-on: ubuntu-latest if: github.event.pull_request.draft == false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 with: From 69b2dd175cdcd24db1d2517ccbb605f58bedb1a3 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 15 Jan 2022 21:06:18 -0500 Subject: [PATCH 2/2] ci(api-docs): avoid running ci for doc commits --- .github/workflows/api-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index ee72cf5f01..23b2c9ed72 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -48,6 +48,6 @@ jobs: if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | git add -u - git commit -m 'docs: regenerate' + git commit -m 'docs: regenerate [skip ci]' git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH} gh pr create --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true