fix: unused rust import #40
This file contains 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 | |
on: | |
push: | |
branches: | |
- "master" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-release-musl-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: clippy, rustfmt | |
target: x86_64-unknown-linux-musl | |
- name: Install node/npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Install musl-tools | |
run: | | |
set -euo pipefail | |
sudo apt-get update -qy | |
sudo apt-get install -qy musl-tools | |
- name: Install node dependencies | |
run: | | |
set -euo pipefail | |
cd qvet-web | |
npm ci | |
- name: Build binary | |
run: | | |
set -euo pipefail | |
cd qvet-standalone | |
./scripts/build-assets.sh | |
cargo build --locked --release --target x86_64-unknown-linux-musl | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: qvet-standalone/Dockerfile | |
push: true | |
tags: tommilligan/qvet:latest |