From 416c63c790beda809e72a542362bbe89b7da2cae Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Jan 2023 22:50:32 +0000 Subject: [PATCH 1/2] switch adopt to temurin and bump to jdk17 (#19527) Co-authored-by: Lucas Costi --- .../building-and-testing-java-with-ant.md | 16 +++++++-------- .../building-and-testing-java-with-gradle.md | 16 +++++++-------- .../building-and-testing-java-with-maven.md | 20 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md index 6638be2610..5095634bb9 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md @@ -59,11 +59,11 @@ jobs: steps: - uses: {% data reusables.actions.action-checkout %} - - name: Set up JDK 11 + - name: Set up JDK 17 uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Build with Ant run: ant -noinput -buildfile build.xml ``` @@ -71,7 +71,7 @@ jobs: This workflow performs the following steps: 1. The `checkout` step downloads a copy of your repository on the runner. -2. The `setup-java` step configures the Java 11 JDK by Adoptium. +2. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium. 3. The "Build with Ant" step runs the default target in your `build.xml` in non-interactive mode. The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs. @@ -93,8 +93,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Run the Ant jar target run: ant -noinput -buildfile build-ci.xml jar ``` @@ -110,8 +110,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - run: ant -noinput -buildfile build.xml - uses: {% data reusables.actions.action-upload-artifact %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md index c1f0c30d86..7254b45e80 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md @@ -63,11 +63,11 @@ jobs: steps: - uses: {% data reusables.actions.action-checkout %} - - name: Set up JDK 11 + - name: Set up JDK 17 uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b - name: Build with Gradle @@ -79,7 +79,7 @@ jobs: This workflow performs the following steps: 1. The `checkout` step downloads a copy of your repository on the runner. -2. The `setup-java` step configures the Java 11 JDK by Adoptium. +2. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium. 3. The "Validate Gradle wrapper" step validates the checksums of Gradle Wrapper JAR files present in the source tree. 4. The "Build with Gradle" step does a build using the `gradle/gradle-build-action` action provided by the Gradle organization on {% data variables.product.prodname_dotcom %}. The action takes care of invoking Gradle, collecting results, and caching state between jobs. For more information see [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action). @@ -102,8 +102,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b - name: Run the Gradle package task @@ -133,8 +133,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b - name: Build with Gradle diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md index db9864ebfc..4ad3cd0dcc 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md @@ -59,11 +59,11 @@ jobs: steps: - uses: {% data reusables.actions.action-checkout %} - - name: Set up JDK 11 + - name: Set up JDK 17 uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Build with Maven run: mvn --batch-mode --update-snapshots package ``` @@ -71,7 +71,7 @@ jobs: This workflow performs the following steps: 1. The `checkout` step downloads a copy of your repository on the runner. -2. The `setup-java` step configures the Java 11 JDK by Adoptium. +2. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium. 3. The "Build with Maven" step runs the Maven `package` target in non-interactive mode to ensure that your code builds, tests pass, and a package can be created. The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs. @@ -93,8 +93,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - name: Run the Maven verify phase run: mvn --batch-mode --update-snapshots verify ``` @@ -111,8 +111,8 @@ steps: - name: Set up JDK 11 uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' cache: maven - name: Build with Maven run: mvn --batch-mode --update-snapshots verify @@ -133,8 +133,8 @@ steps: - uses: {% data reusables.actions.action-checkout %} - uses: {% data reusables.actions.action-setup-java %} with: - java-version: '11' - distribution: 'adopt' + java-version: '17' + distribution: 'temurin' - run: mvn --batch-mode --update-snapshots verify - run: mkdir staging && cp target/*.jar staging - uses: {% data reusables.actions.action-upload-artifact %} From f4b752d7026ad3b81eacea221958b327db1376f4 Mon Sep 17 00:00:00 2001 From: DanielGothenburg <77792011+DanielGothenburg@users.noreply.github.com> Date: Wed, 18 Jan 2023 00:03:05 +0100 Subject: [PATCH 2/2] Update creating-a-docker-container-action.md (#22976) --- .../creating-actions/creating-a-docker-container-action.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/actions/creating-actions/creating-a-docker-container-action.md b/content/actions/creating-actions/creating-a-docker-container-action.md index 4c05df02c7..9172d6af86 100644 --- a/content/actions/creating-actions/creating-a-docker-container-action.md +++ b/content/actions/creating-actions/creating-a-docker-container-action.md @@ -128,6 +128,7 @@ Next, the script gets the current time and sets it as an output variable that ac 1. Make your `entrypoint.sh` file executable. Git provides a way to explicitly change the permission mode of a file so that it doesn’t get reset every time there is a clone/fork. ```shell{:copy} + $ git add entrypoint.sh $ git update-index --chmod=+x entrypoint.sh ```