Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set DOCKER_HOST correctly #222

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
java: [ "21" ]
maven: [ "3.8.2" ]
jdk: [ "temurin" ]

steps:
- name: Check out code
Expand All @@ -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
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@26145a578dce008fee793528d031cd72c57d51af # v3.4.0
with:
set-host: true
daemon-config: |
{
"debug": true,
Expand All @@ -52,20 +53,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 }}
Expand Down
Loading