actions / setup-java

Set up your GitHub Actions workflow with a specific version of Java
MIT License
1.53k stars 734 forks source link

Using GPG on V4, the gpg importer will always take 3 minutes #600

Closed GedMarc closed 5 months ago

GedMarc commented 7 months ago

Description: When configuring and using setup-java on v4 with gpg parameters, the step that imports the gpg key will always take 3 minutes

Task version: V4

Platform:

Runner type:

Repro steps:
Create a working GPG setup using setup-java on v3. Update the version to v4. The task will now take 3 minutes.

Working

       - name: Set up Java
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java-version }}
          distribution: 'oracle'
          #server-id: github_token
          #settings-path: ${{ github.workspace }}
          cache: 'maven'
          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
          gpg-passphrase: GPG_PASSPHRASE

Affected

      - name: Set up Java
        uses: actions/setup-java@v4
        with:
          java-version: ${{ matrix.java-version }}
          distribution: 'oracle'
          #server-id: github_token
          #settings-path: ${{ github.workspace }}
          cache: 'maven'
          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
          gpg-passphrase: secrets.GPG_PASSPHRASE

Expected behavior: The same as in V3, when the task is complete the job must continue immediately.

Actual behavior: The step waits for 3 minutes on any workflow for the task to complete

HarithaVattikuti commented 7 months ago

Hello @GedMarc Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

priyagupta108 commented 6 months ago

Hello @GedMarc 👋 , We've released a new version of setup-java (v4.2.0), and the v4 tag has been updated accordingly. This update includes a version bump for actions/http-client to 2.2.1. We anticipate that this change might address the delay issue with the GPG importer. Could you please confirm if it resolves your issue?

priyagupta108 commented 6 months ago

Hey @GedMarc, Just checking in to see if your issue has been addressed with the recent setup-java update (v4.2.0). Could you please update us on this? Thank you in advance for your update!

GedMarc commented 5 months ago

Issue resolved with version 4.2.0 (y)

Whooop 👯