chore(deps): update deps to avoid webpki vulnerability #180
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: | |
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@v4 | |
- 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@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: 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@v4 | |
- 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 }} |