Skip to content

Commit

Permalink
ci: Use "fix" or "feat" for Update CSpell PRs (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Sep 19, 2022
1 parent be1bf32 commit 6ee2e8c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/update-cspell.yml
Expand Up @@ -32,10 +32,20 @@ jobs:
- name: Update CSpell
run: |
cd action-src
echo CSPELL_VERSION_OLD=$(yarn exec -s cspell -- -V) >> $GITHUB_ENV
yarn add cspell@latest cspell-glob@latest
yarn
yarn exec -s cspell -- -V
echo "CSPELL_VERSION=$(yarn exec -s cspell -- -V)" >> $GITHUB_ENV
- name: Minor Versions
run: |
echo CSPELL_MINOR_OLD=$(echo '"${{ env.CSPELL_VERSION_OLD }}"' | jq 'sub("\\.[0-9]+$";"")') >> $GITHUB_ENV
echo CSPELL_MINOR_NEW=$(echo '"${{ env.CSPELL_VERSION }}"' | jq 'sub("\\.[0-9]+$";"")') >> $GITHUB_ENV
- name: Determine Update type
env:
type: ${{ (env.CSPELL_MINOR_OLD == env.CSPELL_MINOR_NEW && 'fix') || 'feat' }}
run: |
echo PR_TYPE=$type >> $GITHUB_ENV
- name: Install Updates
run: |
yarn install
Expand Down Expand Up @@ -66,10 +76,10 @@ jobs:
if: env.git_status == 'dirty'
uses: peter-evans/create-pull-request@v4
with:
commit-message: "fix: Update CSpell to (${{ env.CSPELL_VERSION }})"
commit-message: "${{ env.PR_TYPE }}: Update CSpell to (${{ env.CSPELL_VERSION }})"
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
title: "fix: Update CSpell to (${{ env.CSPELL_VERSION }}) (${{ env.REF_BRANCH }})"
title: "${{ env.PR_TYPE }}: Update CSpell to (${{ env.CSPELL_VERSION }}) (${{ env.REF_BRANCH }})"
token: ${{ steps.generate-token.outputs.token }}
body: ${{ env.git_body }}
delete-branch: true

0 comments on commit 6ee2e8c

Please sign in to comment.