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
fix github action to build and push server docker container on release. use dockerhub for container hosting
Dane Schneider1acbd90840f9
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.ymlindex f806b088..4eca04cf 100644--- a/.github/workflows/docker-publish.yml+++ b/.github/workflows/docker-publish.yml@@ -3,22 +3,42 @@ name: Build and publish Docker Image if a new Github release was createdon:release:types: [created]+ workflow_dispatch: # enable manual triggeringjobs:build_and_push: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++ # use new $GITHUB_OUTPUT approach- name: Check if the release tag starts with 'server'id: check_tagrun: |if [[ ! "${GITHUB_REF_NAME}" =~ ^server ]]; then- echo "::set-output name=skip::true"+ echo "skip=true" >> $GITHUB_OUTPUTelse- echo "::set-output name=skip::false"+ echo "skip=false" >> $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'."@@ -31,27 +51,25 @@ jobs:if: steps.check_tag.outputs.skip == 'false'uses: docker/setup-buildx-action@v1- - name: Log in to GitHub Container Registry+ - name: Log in to Docker Hubif: steps.check_tag.outputs.skip == 'false'uses: docker/login-action@v1with:- registry: ghcr.io- username: ${{ github.actor }}- password: ${{ secrets.GITHUB_TOKEN }}-+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}- name: Sanitize ref nameid: sanitizeif: steps.check_tag.outputs.skip == 'false'- run: echo "SANITIZED_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV+ run: echo "SANITIZED_REF_NAME=$(echo $GITHUB_REF_NAME | tr '/' '-')" >> $GITHUB_OUTPUT- name: Build and pushif: steps.check_tag.outputs.skip == 'false'uses: docker/build-push-action@v2with:context: ./app/- file: ./app/Dockerfile.server- push: true+ file: ./app/server/Dockerfile+ push: falsetags: |- ghcr.io/${{ github.repository_owner }}/plandex-server:${{ env.SANITIZED_REF_NAME }}- ghcr.io/${{ github.repository_owner }}/plandex-server:latest+ plandexai/plandex-server:${{ steps.sanitize.outputs.SANITIZED_REF_NAME }}+ plandexai/plandex-server:latestdiff --git a/.gitignore b/.gitignoreindex 6764afc8..9a42dbd4 100644--- a/.gitignore+++ b/.gitignore@@ -3,6 +3,8 @@.plandex-v2/.plandex-dev-v2/.envkey+.env+.env.*plandexplandex-devplandex-server