chore(deps): update dependencies #188
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: CI | |
on: [pull_request, push] | |
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@v4 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Configure cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- 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@v4 | |
- name: Check ${{ matrix.checks }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check ${{ 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@v4 | |
- name: Generate Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
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@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Red Hat Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build & push Docker image | |
uses: docker/build-push-action@v6 | |
env: | |
DOCKER_BUILDKIT: 1 | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |