Skip to content

Commit

Permalink
Backport to 1.21.3: Use custom composite checkout action and fix buil…
Browse files Browse the repository at this point in the history
…ds (#1926)

Co-authored-by: Matyrobbrt <[email protected]>
  • Loading branch information
neoforged-automation[bot] and Matyrobbrt authored Jan 28, 2025
1 parent 41791a0 commit 9f69f6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit (PR)
if: ${{ github.event_name == 'pull_request' }}
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}

- name: Create branch for commit
if: ${{ github.event_name != 'pull_request' }}
run:
git switch -C ${{ github.ref_name }}
uses: neoforged/actions/checkout@main

- name: Setup JDK 21
uses: neoforged/actions/setup-java@main
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/check-local-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}
uses: neoforged/actions/checkout@main

- name: Setup JDK 21
uses: neoforged/actions/setup-java@main
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/test-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}
uses: neoforged/actions/checkout@main

- name: Setup JDK 21
uses: neoforged/actions/setup-java@main
Expand Down

0 comments on commit 9f69f6b

Please sign in to comment.