Skip to content

πŸ’š Remove .dockerignore #37

πŸ’š Remove .dockerignore

πŸ’š Remove .dockerignore #37

Workflow file for this run

name: Build and Push Backend
on:
push:
paths:
- backend/**
- .github/workflows/backend.yaml
branches:
- main
workflow_dispatch:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
SQLX_OFFLINE: "true"
defaults:
run:
working-directory: backend
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path backend/Cargo.toml
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path backend/Cargo.toml
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path backend/Cargo.toml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: backend
file: backend/Dockerfile
push: true
tags: |
ghcr.io/schitcrafter/ruscalimat-backend:dev-latest
ghcr.io/schitcrafter/ruscalimat-backend:dev-${{ github.run_number }}