Skip to content

Re-enable the doc/docs command #172

Re-enable the doc/docs command

Re-enable the doc/docs command #172

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
RUSTFLAGS: "-C debuginfo=0 -D warnings"
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Test
env:
RUST_LOG: "off"
run: cargo test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust (nightly)
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run rustfmt
run: cargo fmt -- --check
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy -- -D warnings
cargo-deny:
name: Cargo Deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Check ${{ matrix.checks }}
uses: dnaka91/actions/deny-check@main
with:
checks: ${{ matrix.checks }}
publish:
name: Publish
runs-on: ubuntu-latest
needs: [test, lint]
environment: Docker
concurrency:
group: Docker
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
docker.io/${{ github.repository }}
ghcr.io/${{ github.repository }}
quay.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
flavor: |
latest=true
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Red Hat Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ github.repository_owner }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build & push Docker image
uses: docker/build-push-action@v4
env:
DOCKER_BUILDKIT: 1
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}