Skip to content

Commit

Permalink
Fix release job
Browse files Browse the repository at this point in the history
  • Loading branch information
de-luca committed Aug 12, 2023
1 parent ba42e1b commit b0bd862
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/clippy-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ jobs:
clippy_fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy, rustfmt
profile: minimal
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-${{ hashFiles('**/Cargo.toml') }}
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: cargo clippy
uses: actions-rs/cargo@v1
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,21 @@ jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy, rustfmt
profile: minimal

- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-${{ hashFiles('**/Cargo.toml') }}
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
Expand All @@ -58,18 +54,18 @@ jobs:
artifacts: ${{ steps.archive.outputs.asset }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/login-action@v1
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/metadata-action@v3
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- uses: docker/build-push-action@v2
- uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down

0 comments on commit b0bd862

Please sign in to comment.