From 9f69f6bcd73b898754055193d5ae927f4fa28864 Mon Sep 17 00:00:00 2001 From: "neoforged-automation[bot]" <177631280+neoforged-automation[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 00:11:49 +0000 Subject: [PATCH] Backport to 1.21.3: Use custom composite checkout action and fix builds (#1926) Co-authored-by: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> --- .github/workflows/build-prs.yml | 17 +---------------- .github/workflows/check-local-changes.yml | 11 +---------- .github/workflows/test-prs.yml | 11 +---------- 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-prs.yml b/.github/workflows/build-prs.yml index 1f945197d93..02ccfb147bf 100644 --- a/.github/workflows/build-prs.yml +++ b/.github/workflows/build-prs.yml @@ -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 diff --git a/.github/workflows/check-local-changes.yml b/.github/workflows/check-local-changes.yml index 0609d67e89d..c6bbb27d38b 100644 --- a/.github/workflows/check-local-changes.yml +++ b/.github/workflows/check-local-changes.yml @@ -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 diff --git a/.github/workflows/test-prs.yml b/.github/workflows/test-prs.yml index 471304015a0..c4d3b7e6174 100644 --- a/.github/workflows/test-prs.yml +++ b/.github/workflows/test-prs.yml @@ -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