openrewrite / rewrite-github-actions

OpenRewrite recipes for performing GitHub action hygiene and migration tasks.
Apache License 2.0
9 stars 10 forks source link

`PreferTemurinDistributions` - Update the name of the step #67

Open yeikel opened 1 year ago

yeikel commented 1 year ago

If we update only the distribution it can be misleading if the name of the step have references to the previous distribution

This is a little tricky because the name field is free text. Couple of ideas :

  1. Do a search of replace looking for previous distribution name (probably the easiest)
  2. Set a generic name for that step

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 67dc83b27f..5d96058464 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,10 +12,10 @@ jobs:
           fetch-depth: 0
       - name: Gradle wrapper validation
         uses: gradle/wrapper-validation-action@v1
-      - name: Set up Zulu JDK 11
+      - name: Set up Temurin JDK 11
         uses: actions/setup-java@v3
         with:
-          distribution: 'zulu'
+          distribution: 'temurin'
           java-version: '11'
       - name: Cache SonarCloud packages
         uses: actions/cache@v3