From 0ac201ed0eb8144d27152caf59bae8620eb1d077 Mon Sep 17 00:00:00 2001 From: "Kevin S. Clarke" Date: Thu, 7 Nov 2024 23:40:14 -0500 Subject: [PATCH 1/2] Set DOCKER_HOST correctly --- .github/workflows/release.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c362cd03..5b60834d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ name: Maven Release on: push: tags: [ 'webrepl-*' ] + pull_request: + branches: [ 'webrepl' ] jobs: release: @@ -31,6 +33,7 @@ jobs: - name: Set up Docker uses: crazy-max/ghaction-setup-docker@26145a578dce008fee793528d031cd72c57d51af # v3.4.0 with: + set-host: true daemon-config: | { "debug": true, @@ -52,20 +55,16 @@ jobs: distribution: ${{ matrix.jdk }} java-version: ${{ matrix.java }} - - name: Set environmental variables + - name: Set release version shell: bash run: | GITHUB_REF="${{ github.ref }}" && TAG_NAME="${GITHUB_REF#refs/tags/}" && - # Use 'latest' instead of tag, if being run on a PR branch if [[ $TAG_NAME == "refs/pull/"* ]]; then echo "RELEASE_VERSION=latest" >> $GITHUB_ENV else echo "RELEASE_VERSION=${TAG_NAME#webrepl-}" >> $GITHUB_ENV - fi && - # Set Docker host ENV so the docker-maven-plugin will find the correct Docker instance - DOCKER_HOST="$(ps aux | grep '[d]ockerd' | grep -o -- '--host=[^ ]*' | sed 's/--host=//')" - echo "DOCKER_HOST=${DOCKER_HOST}" >> $GITHUB_ENV + fi - name: Set up Maven if needed if: ${{ env.ACT }} From 4242148779b1f1b41d876a6383f3cee3956a587c Mon Sep 17 00:00:00 2001 From: "Kevin S. Clarke" Date: Thu, 7 Nov 2024 23:56:41 -0500 Subject: [PATCH 2/2] Set DOCKER_HOST correctly --- .github/workflows/build.yml | 3 ++- .github/workflows/release.yml | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8d3f14d..03003b61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,7 @@ jobs: matrix: java: [ "21" ] maven: [ "3.8.2" ] + jdk: [ "temurin" ] steps: - name: Check out code @@ -34,7 +35,7 @@ jobs: uses: actions/setup-java@860f60056505705214d223b91ed7a30f173f6142 # v3.3.0 with: cache: maven - distribution: 'adopt' + distribution: ${{ matrix.jdk }} java-version: ${{ matrix.java }} # If running locally in act, install Maven diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b60834d..c1c31f1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,6 @@ name: Maven Release on: push: tags: [ 'webrepl-*' ] - pull_request: - branches: [ 'webrepl' ] jobs: release: