Fix entrypoint.sh arg handling - stdio mode unreachable (#11) #1
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: Release & Publish (GHCR + cross-compiled binaries) | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-push-and-release: | |
| name: Build, Push Docker, Create Release, Upload Binaries | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Checkout (full history & tags) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Authenticate to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine tag name | |
| id: tag | |
| run: | | |
| echo "ref_name=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT | |
| - name: Build and push multi-arch Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/rust-cargo-docs-rag-mcp:${{ steps.tag.outputs.ref_name }} | |
| ghcr.io/${{ github.repository_owner }}/rust-cargo-docs-rag-mcp:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Create GitHub release | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare for cross-compilation (install toolchains) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
| rustup default 1.91.1 | |
| rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu | |
| - name: Build x86_64-unknown-linux-gnu release binary | |
| run: | | |
| cargo build --locked --release --target x86_64-unknown-linux-gnu | |
| strip target/x86_64-unknown-linux-gnu/release/cratedocs || true | |
| - name: Build aarch64-unknown-linux-gnu release binary | |
| env: | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
| CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc | |
| CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++ | |
| AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar | |
| run: | | |
| cargo build --locked --release --target aarch64-unknown-linux-gnu | |
| aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/cratedocs || true | |
| - name: Upload x86_64 binary to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: target/x86_64-unknown-linux-gnu/release/cratedocs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload aarch64 binary to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: target/aarch64-unknown-linux-gnu/release/cratedocs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |