mbien commented on code in PR #39:
URL: https://github.com/apache/netbeans-jackpot30/pull/39#discussion_r2296710436


##########
.github/workflows/main.yml:
##########
@@ -38,19 +38,34 @@ jobs:
     steps:
 
       - name: Checkout ${{ github.ref }} ( ${{ github.sha }} )
-        uses: actions/checkout@v3
+        uses: actions/checkout@v5
         with:
           persist-credentials: false
           submodules: false
 
       - name: Set up Ubuntu dependencies
         run: |
-            sudo apt install openjdk-11-jdk openjdk-17-jdk openjdk-21-jdk
+            sudo apt update
+            sudo apt install openjdk-17-jdk openjdk-21-jdk
+
+      - name: Download latest JDK 24
+        run: |
+            PROC=`uname -p`
+            if [ "$PROC" = "x86_64" ] ; then PROC="x64"; fi;
+            URL=`wget 
https://raw.githubusercontent.com/oracle-actions/setup-java/refs/heads/main/jdk.java.net-uri.properties
 -O - | grep "24,latest,linux,$PROC" | cut -d '=' -f 2-`
+            wget $URL -O $RUNNER_TEMP/jdk-24.tar.gz
+
+      - name: Set up JDK 24 from the downloaded archive
+        uses: actions/setup-java@v5
+        with:
+            distribution: 'jdkfile'
+            jdkFile: ${{ runner.temp }}/jdk-24.tar.gz
+            java-version: '24'

Review Comment:
   i suppose the reason for the parsing is because the normal `setup-java` 
action doesn't offer jdk.java.net downloads?
   
   In that case:
   we _can_ use third party actions, we just have to pin their versions and 
activate dependabot.
   
   ```yaml
         - name: Set up latest JDK 24 from jdk.java.net
           uses: 
oracle-actions/setup-java@b1546e588c27008e88bfcabda44d11c22316b9b8 # v1.4.2
           with:
               website: jdk.java.net
               release: 24
   ```
   
   dependabot file for actions updates:
   
   https://github.com/apache/netbeans/blob/master/.github/dependabot.yml
   
   would hat be easier?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to