Skip to content

fix clippy error

fix clippy error #39

name: Release all services docker image
on:
push:
tags:
- '*'
jobs:
push_to_registry:
name: Push docker image to registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Check out the repo
uses: actions/checkout@v3
- name: Init rust envrionment
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Check format
run: cargo fmt --all -- --check
- name: Check with clippy
run: cargo clippy --all-features
- name: Build rust
run: cargo build --release -p bios-serv-all
- name: Copy binary to workspace
run: cp ./target/release/bios-serv-all ./backend/services/bios-all/
- name: Build and push Docker image to github
uses: mr-smithers-excellent/docker-build-push@v5
with:
directory: backend/services/bios-all
dockerfile: backend/services/bios-all/Dockerfile
registry: ghcr.io
image: bios-serv-all
tags: ${{ github.ref_name }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push Docker image to dockerhub
uses: mr-smithers-excellent/docker-build-push@v5
with:
directory: services/bios-all
dockerfile: services/bios-all/Dockerfile
registry: docker.io
image: ecfront/bios-serv-all
tags: ${{ github.ref_name }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}