openrewrite / openrewrite/rewrite-github-actions

`PreferTemurinDistributions` - Update the name of the step

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

recipe
Dominant language
Java
Stars
1
Forks
9
Avg merge
5h 27m
Merged PRs (30d)
12

Description

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


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PreferTemurinDistributions recipe and the example workflow in .github/workflows/ci.yml. Check how the distribution value changes while the step name remains tied to the previous distribution, then update the recipe so the generated step name matches the selected distribution. Done means the workflow no longer labels a Temurin setup step as Zulu.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, java
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.