diff --git a/.github/workflows/cli-docker.yml b/.github/workflows/cli-docker.yml index b5405c48..f5204400 100644 --- a/.github/workflows/cli-docker.yml +++ b/.github/workflows/cli-docker.yml @@ -57,7 +57,7 @@ jobs: MAJOR_MINOR=$(echo "${VERSION}" | cut -d. -f1,2) SHORT_SHA=$(git rev-parse --short HEAD) IMAGE="ghcr.io/${{ github.repository_owner }}/livesync-cli" - + # Build tag list based on the event and git ref TAGS="" if [[ "${{ github.ref }}" == refs/tags/* ]]; then @@ -70,7 +70,7 @@ jobs: # Other branches / manual run fallback TAGS="${IMAGE}:${VERSION}-dev-sha-${SHORT_SHA}-cli" fi - + # Determine if the image should be pushed PUSH="true" if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then @@ -78,7 +78,7 @@ jobs: PUSH="false" fi fi - + echo "tags=${TAGS}" >> $GITHUB_OUTPUT echo "push=${PUSH}" >> $GITHUB_OUTPUT @@ -89,6 +89,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -126,5 +131,6 @@ jobs: file: src/apps/cli/Dockerfile push: ${{ steps.meta.outputs.push }} tags: ${{ steps.meta.outputs.tags }} + platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max diff --git a/test/e2e-obsidian/README.md b/test/e2e-obsidian/README.md index b7794661..746d8b85 100644 --- a/test/e2e-obsidian/README.md +++ b/test/e2e-obsidian/README.md @@ -76,10 +76,10 @@ For example, to test an executable on `PATH`: LIVESYNC_CLI_COMMAND='livesync-cli' npm run test:e2e:obsidian:cli-to-obsidian-sync ``` -On Linux, the published Docker image can run against the local CouchDB fixture by sharing the temporary directory, using host networking, preserving the host user's file ownership, and overriding the image entrypoint so that the runner can supply its explicit database path. The published image is currently built for AMD64; Docker emulation is therefore required on an ARM host. +On Linux, a multi-architecture published Docker image can run against the local CouchDB fixture by sharing the temporary directory, using host networking, preserving the host user's file ownership, and overriding the image entrypoint so that the runner can supply its explicit database path. Images published before ARM64 support remain AMD64-only and require configured Docker emulation on an ARM host. ```bash -LIVESYNC_CLI_COMMAND="docker run --rm --platform linux/amd64 --network host --user $(id -u):$(id -g) --volume /tmp:/tmp --entrypoint node ghcr.io/vrtmrz/livesync-cli:0.25.81-cli /app/dist/index.cjs" \ +LIVESYNC_CLI_COMMAND="docker run --rm --network host --user $(id -u):$(id -g) --volume /tmp:/tmp --entrypoint node ghcr.io/vrtmrz/livesync-cli:edge /app/dist/index.cjs" \ npm run test:e2e:obsidian:cli-to-obsidian-sync ```