Skip to content

Commit c33f97a

Browse files
authored
Merge 476c42e into 0253f07
2 parents 0253f07 + 476c42e commit c33f97a

File tree

5 files changed

+164
-1
lines changed

5 files changed

+164
-1
lines changed

.github/actions/rust-info/action.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
2+
3+
name: rust info
4+
description: get rust info
5+
6+
outputs:
7+
package-names:
8+
description: package name "foo"
9+
value: ${{steps.cargo.outputs.package-names}}
10+
host:
11+
description: host "x86_64-unknown-linux-gnu"
12+
value: ${{steps.rustc.outputs.host}}
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- id: cargo
18+
run: |
19+
echo "package-names=$(cargo metadata --no-deps | jq --compact-output '.packages | map(.name)')" >> $GITHUB_OUTPUT
20+
shell: bash
21+
- id: rustc
22+
run: |
23+
echo "host=$(rustc -vV | awk '/host/ { print $2 }')" >> $GITHUB_OUTPUT
24+
shell: bash

.github/workflows/clippy.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Clippy check
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
env:
8+
RUSTFLAGS: "-Dwarnings"
9+
10+
permissions: {}
11+
12+
jobs:
13+
clippy_check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
17+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
18+
with:
19+
toolchain: stable
20+
components: clippy
21+
- id: rustc
22+
uses: ./.github/actions/rust-info
23+
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
24+
with:
25+
key: ${{ steps.rustc.outputs.host }}
26+
- name: Run Clippy
27+
run: cargo clippy --all-targets --all-features

.github/workflows/docker-publish.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
with:
6464
toolchain: stable
6565
target: ${{ matrix.target }}
66+
- id: rustc
67+
uses: ./.github/actions/rust-info
6668
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
6769
with:
6870
key: ${{ matrix.target }}
@@ -96,7 +98,7 @@ jobs:
9698
needs: build
9799
permissions:
98100
packages: write
99-
runs-on: 'ubuntu-latest'
101+
runs-on: "ubuntu-latest"
100102
outputs:
101103
image_tags: ${{ steps.meta.outputs.tags }}
102104
env:

Cargo.lock

+106
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9+
tokio = "1.36.0"
10+
11+
[lints.clippy]
12+
pedantic = "warn"

0 commit comments

Comments
 (0)