Skip to content

Commit

Permalink
update github action workflow dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewmeyer committed Oct 19, 2024
1 parent f39ec2d commit 794118a
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,38 @@ 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
runs-on: ubuntu-latest
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

0 comments on commit 794118a

Please sign in to comment.