From 86b957c51785012e0aff35b95a0759b7d58f9475 Mon Sep 17 00:00:00 2001 From: Matt Webb Date: Sun, 24 Mar 2024 20:47:47 -0700 Subject: [PATCH] ci: fix the ci workflow checkout --- .github/workflows/ci.yml | 17 +++++++++++++++-- .github/workflows/pr.yml | 13 ------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9213a260..2cb9baa1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: - master - pull_request_target: + pull_request: schedule: - cron: '0 0 * * 0' @@ -90,7 +90,7 @@ jobs: fail_ci_if_error: true docs: runs-on: ubuntu-latest - if: github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -99,3 +99,16 @@ jobs: - run: yarn - run: yarn ci:generate-config-docs - run: cat CONFIG.md + lint-commits: + timeout-minutes: 10 + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + - run: yarn + - run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 02642cf4..4b307a62 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,19 +8,6 @@ concurrency: cancel-in-progress: true jobs: - lint-commits: - timeout-minutes: 10 - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: '18.x' - - run: yarn --immutable --immutable-cache - - run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose automerge: timeout-minutes: 10 runs-on: ubuntu-latest