fix: MCP project CWD detection for Cursor and Codex Desktop #68
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Docker Image | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| env: | |
| IMAGE_NAME: chocksy/cems-server | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "tags=${IMAGE_NAME}:${VERSION},${IMAGE_NAME}:latest" >> $GITHUB_OUTPUT | |
| else | |
| echo "tags=${IMAGE_NAME}:latest" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.version.outputs.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Update Docker Hub description | |
| uses: peter-evans/dockerhub-description@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: chocksy/cems-server | |
| readme-filepath: ./README.md | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| # Get commit message from the tagged commit for release title | |
| TITLE=$(git log -1 --format='%s' "$TAG" 2>/dev/null || echo "$TAG") | |
| # Generate changelog from previous tag | |
| PREV_TAG=$(git tag --sort=-v:refname | grep -A1 "^${TAG}$" | tail -1) | |
| if [ -n "$PREV_TAG" ] && [ "$PREV_TAG" != "$TAG" ]; then | |
| CHANGELOG=$(git log --oneline "${PREV_TAG}..${TAG}" | head -20) | |
| else | |
| CHANGELOG="Initial release" | |
| fi | |
| gh release create "$TAG" \ | |
| --title "$TAG — ${TITLE#*: }" \ | |
| --notes "## Changes | |
| ${CHANGELOG} | |
| ## Docker | |
| \`\`\`bash | |
| docker pull chocksy/cems-server:${TAG#v} | |
| \`\`\`" \ | |
| --target "${{ github.sha }}" || true | |
| - name: Deploy to Coolify | |
| if: success() | |
| run: | | |
| curl -sSf -X POST \ | |
| "${{ secrets.COOLIFY_WEBHOOK_URL }}" \ | |
| -H "Authorization: Bearer ${{ secrets.COOLIFY_API_TOKEN }}" \ | |
| -H "Content-Type: application/json" |