From 794118ab7a1dbfc96d194ff5c370517c41933115 Mon Sep 17 00:00:00 2001 From: Jake Meyer Date: Fri, 18 Oct 2024 22:34:40 -0700 Subject: [PATCH] update github action workflow dependencies --- .github/workflows/ci.yml | 50 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2274c44..1e639bf 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,29 +14,19 @@ jobs: uses: actions/checkout@v4 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - + uses: dtolnay/rust-toolchain@stable + - name: Caching uses: Swatinem/rust-cache@v2 - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + run: cargo fmt -- --check - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy + run: cargo clippy --all-targets --all-features - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test --all-targets --all-features push-image: name: Push Image @@ -44,18 +34,18 @@ jobs: needs: check if: github.ref == 'refs/heads/main' steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.PACKAGES_ACCESS_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: ghcr.io/jakewmeyer/ddrs:latest - cache-from: type=registry,ref=ghcr.io/jakewmeyer/ddrs:latest - cache-to: type=inline + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.PACKAGES_ACCESS_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/jakewmeyer/ddrs:latest + cache-from: type=gha + cache-to: type=gha,mode=max