wolfdisk v2.11.0: small-files replication no longer collapses writes … #11
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: WolfDisk — Publish Docker Image | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'wolfdisk/Cargo.toml' | |
| - 'wolfdisk/src/**' | |
| - 'wolfdisk/docker/**' | |
| - '.github/workflows/wolfdisk-docker-publish.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build-binaries: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-musl | |
| arch: amd64 | |
| runner: ubuntu-latest | |
| - target: aarch64-unknown-linux-musl | |
| arch: arm64 | |
| runner: ubuntu-latest | |
| runs-on: ${{ matrix.runner }} | |
| defaults: | |
| run: | |
| working-directory: wolfdisk | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| # Install the published release with its pinned lockfile (git HEAD fails | |
| # to compile on the runner's toolchain). | |
| run: cargo install cross --locked | |
| working-directory: . | |
| - name: Build static binaries | |
| run: cross build --release --target ${{ matrix.target }} | |
| - name: Stage binaries | |
| run: | | |
| mkdir -p dist/${{ matrix.arch }} | |
| cp target/${{ matrix.target }}/release/wolfdisk dist/${{ matrix.arch }}/wolfdisk | |
| cp target/${{ matrix.target }}/release/wolfdiskctl dist/${{ matrix.arch }}/wolfdiskctl | |
| chmod +x dist/${{ matrix.arch }}/wolfdisk dist/${{ matrix.arch }}/wolfdiskctl | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wolfdisk-binaries-${{ matrix.arch }} | |
| path: wolfdisk/dist/${{ matrix.arch }}/ | |
| publish: | |
| needs: build-binaries | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get version | |
| id: version | |
| run: echo "version=$(grep '^version' wolfdisk/Cargo.toml | head -1 | sed 's/.*\"\(.*\)\".*/\1/')" >> "$GITHUB_OUTPUT" | |
| - name: Download amd64 binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wolfdisk-binaries-amd64 | |
| path: wolfdisk/dist/amd64 | |
| - name: Download arm64 binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wolfdisk-binaries-arm64 | |
| path: wolfdisk/dist/arm64 | |
| - name: Ensure binaries are executable | |
| run: chmod +x wolfdisk/dist/amd64/* wolfdisk/dist/arm64/* | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push multi-arch image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: wolfdisk | |
| file: wolfdisk/docker/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ghcr.io/wolfsoftwaresystemsltd/wolfdisk:latest | |
| ghcr.io/wolfsoftwaresystemsltd/wolfdisk:${{ steps.version.outputs.version }} |