Skip to content

Commit

Permalink
Update major version check
Browse files Browse the repository at this point in the history
  • Loading branch information
chloerice committed Apr 18, 2024
1 parent c4f766f commit cffe4af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/major-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
if: |
!contains(github.event.pull_request.labels.*.name, '🤖Skip Major Check')
runs-on: ubuntu-latest
env:
HEAD_REF: ${{ github.head_ref }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -24,11 +26,11 @@ jobs:
run: git fetch --all

- name: Checkout the feature branch
run: git checkout ${{ github.head_ref }} --
run: git checkout "$HEAD_REF" --

- name: Check major versions in changeset entries
run: |
commits="origin/${{ github.base_ref }}...origin/${{ github.head_ref }}"
commits="origin/$("$HEAD_REF")...origin/$("$HEAD_REF")"
changeset_files=$(git diff --name-only --diff-filter=d "$commits" -- ".changeset/*.md")
if [[ -z "$changeset_files" ]]; then
Expand Down

0 comments on commit cffe4af

Please sign in to comment.