Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
make Dockerfile and build/push GH action work multi-platform
Dane Schneider5c7149dddf11
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.ymlindex 612b9f06..27e88c29 100644--- a/.github/workflows/docker-publish.yml+++ b/.github/workflows/docker-publish.yml@@ -10,43 +10,39 @@ jobs:runs-on: ubuntu-lateststeps:- # old output approach- # - name: Check if the release tag starts with 'server'- # id: check_tag- # run: |- # if [[ ! "${GITHUB_REF_NAME}" =~ ^server ]]; then- # echo "::set-output name=skip::true"- # else- # echo "::set-output name=skip::false"- # fi- # shell: bash+ - name: Check out the repo+ uses: actions/checkout@v2+ with:+ fetch-depth: 0 # Fetch all history and tags- # use new $GITHUB_OUTPUT approach- - name: Check if the release tag starts with 'server'- id: check_tag+ - name: Find latest 'server' tag+ id: find_tagrun: |- if [[ ! "${GITHUB_REF_NAME}" =~ ^server ]]; then+ # Find the latest tag that starts with 'server'+ LATEST_SERVER_TAG=$(git tag -l "server*" --sort=-creatordate | head -n 1)++ if [ -z "$LATEST_SERVER_TAG" ]; then+ echo "No tags starting with 'server' found."echo "skip=true" >> $GITHUB_OUTPUTelse+ echo "Found latest server tag: $LATEST_SERVER_TAG"echo "skip=false" >> $GITHUB_OUTPUT+ echo "tag=$LATEST_SERVER_TAG" >> $GITHUB_OUTPUTfishell: bash- # for local testing with act- # - name: Check if the release tag starts with 'server'- # id: check_tag- # run: |- # echo "skip=false" >> $GITHUB_OUTPUT- # shell: bash-- - name: Skip build if tag does not start with 'server'- if: steps.check_tag.outputs.skip == 'true'- run: echo "Skipping build because the tag does not start with 'server'."+ - name: Skip build if no server tag found+ if: steps.find_tag.outputs.skip == 'true'+ run: echo "Skipping build because no tag starting with 'server' was found."- name: Check out the repoif: steps.check_tag.outputs.skip == 'false'uses: actions/checkout@v2+ - name: Set up QEMU+ if: steps.check_tag.outputs.skip == 'false'+ uses: docker/setup-qemu-action@v2+- name: Set up Docker Buildxif: steps.check_tag.outputs.skip == 'false'uses: docker/setup-buildx-action@v1@@ -70,6 +66,7 @@ jobs:context: ./app/file: ./app/server/Dockerfilepush: true+ platforms: linux/amd64,linux/arm64tags: |plandexai/plandex-server:${{ steps.sanitize.outputs.SANITIZED_REF_NAME }}plandexai/plandex-server:latestdiff --git a/app/server/Dockerfile b/app/server/Dockerfileindex 89157ccd..0188e14a 100644--- a/app/server/Dockerfile+++ b/app/server/Dockerfile@@ -1,4 +1,4 @@-FROM --platform=linux/amd64 golang:1.23.3+FROM golang:1.23.3# Update and install necessary packages including build tools for Tree-sitterRUN apt-get update && \@@ -21,10 +21,6 @@ COPY ./scripts /scripts# Set working directory to serverWORKDIR /app/server-# Set environment variables for Go-ENV GOOS=linux-ENV GOARCH=amd64-# Build the applicationRUN rm -f plandex-server && go build -o plandex-server .