Skip to content

Commit

Permalink
Switch to dtolnay/rust-toolchain GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Nov 4, 2022
1 parent 468f8a2 commit fac381e
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VER }}
override: true
components: clippy
- run: rustup default ${{ env.RUST_VER }}
- uses: Swatinem/rust-cache@v1
if: ${{ env.CACHE == 'true' }}

- run: make cargo.lint

helm-lint:
name: lint Helm chart
name: helm lint
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
strategy:
fail-fast: false
Expand All @@ -83,9 +82,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt

Expand All @@ -104,16 +102,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_VER }}
- run: rustup default ${{ env.RUST_VER }}
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rust-src
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VER }}
override: true
- uses: Swatinem/rust-cache@v1
if: ${{ env.CACHE == 'true' }}

Expand All @@ -132,11 +128,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VER }}
override: true
- run: rustup default ${{ env.RUST_VER }}
- uses: Swatinem/rust-cache@v1
if: ${{ env.CACHE == 'true' }}
- uses: satackey/action-docker-layer-caching@v0.0.11
Expand Down Expand Up @@ -169,13 +164,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ (matrix.toolchain == 'stable' && env.RUST_VER)
|| matrix.toolchain }}
components: rust-src
override: true
- run: rustup default
${{ (matrix.toolchain == 'stable' && env.RUST_VER)
|| matrix.toolchain }}
- uses: Swatinem/rust-cache@v1
if: ${{ env.CACHE == 'true' }}

Expand Down Expand Up @@ -218,11 +214,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VER }}
override: true
- run: rustup default ${{ env.RUST_VER }}
- uses: Swatinem/rust-cache@v1
if: ${{ env.CACHE == 'true' }}

Expand All @@ -235,8 +230,8 @@ jobs:
# Releasing #
#############

release-docker:
name: release Docker image
docker-push:
name: docker push
if: ${{ github.event_name == 'push'
&& (github.ref == 'refs/heads/main'
|| startsWith(github.ref, 'refs/tags/v')) }}
Expand Down Expand Up @@ -352,7 +347,7 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs:
- clippy
- release-docker
- docker-push
- rustdoc
- rustfmt
- test-e2e-debug
Expand Down

0 comments on commit fac381e

Please sign in to comment.