when: - event: push branch: main steps: - name: build-x86_64 image: rust:bookworm commands: - cargo build --release - cp target/release/backend target/backend-amd64 - name: build-arm64 image: rust:bookworm commands: - CROSS_CONTAINER_IN_CONTAINER=true cargo install -f cross - CROSS_CONTAINER_IN_CONTAINER=true cross build --target=aarch64-unknown-linux-gnu --release - cp target/aarch64-unknown-linux/release/backend target/backend-arm64 volumes: - /var/run/podman/podman.sock:/var/run/docker.sock - name: container-build-and-publish image: docker commands: - docker login --username radical --password $PASSWORD git.gorb.app - docker buildx build --platform linux/amd64,linux/arm64 --rm --push -t git.gorb.app/gorb/backend:main . environment: PASSWORD: from_secret: docker_password volumes: - /var/run/podman/podman.sock:/var/run/docker.sock