File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed
Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Checkout Rust
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ runs-on :
7+ default : ubuntu-latest
8+ required : false
9+ type : string
10+ name :
11+ default : cargo-action
12+ required : false
13+ type : string
14+ command :
15+ default : check
16+ required : false
17+ type : string
18+ args :
19+ default : " "
20+ required : false
21+ type : string
22+
23+ jobs :
24+ cargo-action :
25+ permissions :
26+ contents : read
27+
28+ name : ${{ inputs.name }}
29+ runs-on : ${{ inputs.runs-on }}
30+ steps :
31+
32+ - uses : actions/checkout@v4
33+ - uses : actions-rs/toolchain@v1
34+ with :
35+ toolchain : stable
36+
37+ - uses : actions-rs/cargo@v1
38+ with :
39+ command : ${{ inputs.command }}
40+ args : ${{ inputs.args }}
Original file line number Diff line number Diff line change 1+ name : CI/CD
2+
3+ on :
4+ workflow_dispatch :
5+ workflow_call :
6+ pull_request :
7+ push :
8+ branches :
9+ - main
10+ - dev
11+ paths :
12+ - " src/**/**.rs"
13+ - " crates/**/**.rs"
14+ - " kernel/*.rs"
15+
16+ jobs :
17+ quality-gate :
18+ uses : RustLangES/.github/.github/workflows/quality-gate.yml@main
19+ with :
20+ runs-on : ubuntu-latest
21+ checks-command : " --all --check"
22+ clippy-command : " -- -D warnings"
23+ tests-command : " test"
24+
25+ build_and_test :
26+ needs : quality-gate
27+ name : Rust project
28+ runs-on : ubuntu-latest
29+ steps :
30+
31+ - uses : ./.github/actions/cargo-action.yml
32+ with :
33+ runs-on : ubuntu-latest
34+ name : cargo-action
35+ command : build
36+ args : " --release --all-features"
Original file line number Diff line number Diff line change 1+ name : test and publish
2+
3+ on :
4+ workflow_run :
5+ workflows : ["CI/CD"]
6+ types :
7+ - completed
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ release :
14+ runs-on : ubuntu-latest
15+ if : ${{ github.ref == 'refs/heads/main' }}
16+ steps :
17+
18+ - name : release
19+ run : |
20+ echo "ToDo: release"
You can’t perform that action at this time.
0 commit comments