Skip to content

Commit

Permalink
Update workflows to use default environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronccasanova committed Apr 18, 2024
1 parent cffe4af commit 2c1a168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/major-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ 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 @@ -26,11 +24,11 @@ jobs:
run: git fetch --all

- name: Checkout the feature branch
run: git checkout "$HEAD_REF" --
run: git checkout "$GITHUB_HEAD_REF" --

- name: Check major versions in changeset entries
run: |
commits="origin/$("$HEAD_REF")...origin/$("$HEAD_REF")"
commits="origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF"
changeset_files=$(git diff --name-only --diff-filter=d "$commits" -- ".changeset/*.md")
if [[ -z "$changeset_files" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/migrator-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
run: git fetch --all

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

- name: Check for generic migrator comment in diff
run: |
commits="origin/${{ github.base_ref }}...origin/${{ github.head_ref }}"
commits="origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF"
files=$(git diff --name-only --diff-filter=d "$commits" -- "*.scss")
if [ -n "$files" ]; then
Expand Down

0 comments on commit 2c1a168

Please sign in to comment.