This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
bug fix: calculating item_ids array size correctly #5
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: Build, Test and Push to Docker Hub | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
- master | |
env: | |
SQLX_OFFLINE: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Build and test code | |
run: | | |
cargo build --verbose | |
cargo test --verbose | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker images | |
uses: docker/bake-action@v4 | |
with: | |
push: true | |
set: | | |
*.cache-from=type=gha | |
*.cache-to=type=gha,mode=max |