Skip to content

Testing docker again #2

Testing docker again

Testing docker again #2

Workflow file for this run

name: Test docker build push
on:
push:
branches:
- docker-2
env:
CARGO_TERM_COLOR: always
jobs:
cross-compile-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Make a directory for output artifacts
run: mkdir -p target/artifacts
- name: install linux cross compiler
run: brew tap messense/macos-cross-toolchains &&
brew install x86_64-unknown-linux-musl
- name: Build release linux x86_64 binary
run: rustup target install x86_64-unknown-linux-musl &&
make release-linux-x86_64 &&
mv target/x86_64-unknown-linux-musl/release-github/rqbit target/artifacts/rqbit-linux-static-x86_64
- name: Archive the binary artifact
uses: actions/upload-artifact@v4
with:
name: rqbit-linux-static-x86_64
path: output/rqbit-linux-static-x86_64
build-push-docker:
runs-on: ubuntu-latest
needs: cross-compile-on-macos
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: rqbit-linux-static-x86_64
path: target/x86_64/rqbit
- name: chmod +x
run: chmod +x target/x86_64/rqbit
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ikatson/rqbit:${{ env.GITHUB_REF_NAME }}
context: target/x86_64/
platforms: linux/amd64
file: docker/Dockerfile