diff --git a/.github/workflows/create-test-lint-wf-template.yml b/.github/workflows/create-test-lint-wf-template.yml index b4579178bd..78d174434b 100644 --- a/.github/workflows/create-test-lint-wf-template.yml +++ b/.github/workflows/create-test-lint-wf-template.yml @@ -91,11 +91,10 @@ jobs: python -m pip install --upgrade pip pip install . - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Install Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/.github/workflows/create-test-wf.yml b/.github/workflows/create-test-wf.yml index 4ad4d98e0d..55b64f9cfb 100644 --- a/.github/workflows/create-test-wf.yml +++ b/.github/workflows/create-test-wf.yml @@ -59,11 +59,10 @@ jobs: python -m pip install --upgrade pip pip install . - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Install Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 45d08d30ba..dcf5f0b0cc 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -120,11 +120,10 @@ jobs: id: date run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Install Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/nf_core/pipeline-template/.github/workflows/ci.yml b/nf_core/pipeline-template/.github/workflows/ci.yml index 5279d8b6d6..d022850ec5 100644 --- a/nf_core/pipeline-template/.github/workflows/ci.yml +++ b/nf_core/pipeline-template/.github/workflows/ci.yml @@ -47,11 +47,10 @@ jobs: - name: Check out pipeline code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Set up Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index 4a483f6ed6..5d483bd0a4 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -31,11 +31,10 @@ jobs: download: runs-on: ubuntu-latest steps: - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Install Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/nf_core/pipeline-template/.github/workflows/linting.yml b/nf_core/pipeline-template/.github/workflows/linting.yml index ede8a34355..a6150781c3 100644 --- a/nf_core/pipeline-template/.github/workflows/linting.yml +++ b/nf_core/pipeline-template/.github/workflows/linting.yml @@ -33,11 +33,10 @@ jobs: - name: Check out pipeline code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - # Set up JAVA_HOME for Java 21 - - name: Set Java 21 - run: | - echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV - echo "PATH=$JAVA_HOME_21_X64/bin:$PATH" >> $GITHUB_ENV + - uses: actions/setup-java@v4 + with: + java-version: "21" + distribution: "temurin" - name: Install Nextflow uses: nf-core/setup-nextflow@v2