From 9cc8b93070e111c7a4b5beb1ee3bd2e51d96f2ca Mon Sep 17 00:00:00 2001 From: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:56:41 +0530 Subject: [PATCH] CI: checkout repo before spell checking pr title (#2776) --- ...heck.yml => conventional-commit-check.yml} | 17 +----------- .github/workflows/pr-title-spell-check.yml | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 16 deletions(-) rename .github/workflows/{pr-title-check.yml => conventional-commit-check.yml} (89%) create mode 100644 .github/workflows/pr-title-spell-check.yml diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/conventional-commit-check.yml similarity index 89% rename from .github/workflows/pr-title-check.yml rename to .github/workflows/conventional-commit-check.yml index 167be295443b..5fd25e9332d1 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/conventional-commit-check.yml @@ -1,4 +1,4 @@ -name: PR Title Checks +name: Conventional Commit Message Check on: # This is a dangerous event trigger as it causes the workflow to run in the @@ -35,21 +35,6 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse jobs: - typos: - name: Spell check PR title - runs-on: ubuntu-latest - steps: - - name: Store PR title in a file - shell: bash - env: - TITLE: ${{ github.event.pull_request.title }} - run: echo $TITLE > pr_title.txt - - - name: Spell check - uses: crate-ci/typos@master - with: - files: ./pr_title.txt - pr_title_check: name: Verify PR title follows conventional commit standards runs-on: ubuntu-latest diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml new file mode 100644 index 000000000000..6ab6f184739d --- /dev/null +++ b/.github/workflows/pr-title-spell-check.yml @@ -0,0 +1,27 @@ +name: PR Title Spell Check + +on: + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + typos: + name: Spell check PR title + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Store PR title in a file + shell: bash + env: + TITLE: ${{ github.event.pull_request.title }} + run: echo $TITLE > pr_title.txt + + - name: Spell check + uses: crate-ci/typos@master + with: + files: ./pr_title.txt