diff --git a/.github/workflows/jib-cli-release.yml b/.github/workflows/jib-cli-release.yml index db857d627b..2284e1f78e 100644 --- a/.github/workflows/jib-cli-release.yml +++ b/.github/workflows/jib-cli-release.yml @@ -56,9 +56,7 @@ jobs: uses: repo-sync/pull-request@v2.12.1 id: create-pr with: - # Use a personal token to file a PR as a non-bot author to trigger other workflows (e.g., unit tests): - # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token; - github_token: ${{ secrets.GA_RELEASE_PR_PERSONAL_TOKEN }} + github_token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} source_branch: cli-release-v${{ github.event.inputs.release_version }} pr_title: "CLI release v${{ github.event.inputs.release_version }}" pr_body: "To be merged after the release is complete." diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 6a2fc0635c..0248584a91 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -62,11 +62,7 @@ jobs: uses: repo-sync/pull-request@v2.12.1 id: create-pr with: - # Use a personal token to file a PR to trigger other workflows (e.g., unit tests). - # Save your access token as GA_RELEASE_PR_PERSONAL_TOKEN. - # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token - # https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets - github_token: ${{ secrets.GA_RELEASE_PR_PERSONAL_TOKEN }} + github_token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} source_branch: ${{ github.event.inputs.project }}-release-v${{ github.event.inputs.release_version }} pr_title: "${{ github.event.inputs.project }} release v${{ github.event.inputs.release_version }}" pr_body: "To be merged after the release is complete." diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java b/jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java index 1842a79de3..d3dcecd883 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java +++ b/jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java @@ -189,11 +189,12 @@ public boolean supported(Map parameters) { public DockerInfoDetails info() throws IOException, InterruptedException { // Runs 'docker info'. Process infoProcess = docker("info", "-f", "{{json .}}"); + InputStream inputStream = infoProcess.getInputStream(); if (infoProcess.waitFor() != 0) { throw new IOException( "'docker info' command failed with error: " + getStderrOutput(infoProcess)); } - return JsonTemplateMapper.readJson(infoProcess.getInputStream(), DockerInfoDetails.class); + return JsonTemplateMapper.readJson(inputStream, DockerInfoDetails.class); } @Override