Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use "fix" or "feat" for Update CSpell PRs #976

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/update-cspell.yml
Original file line number Diff line number Diff line change
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