Skip to content

Commit

Permalink
Allow specifying Rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Apr 4, 2022
1 parent 23cfcf6 commit 8b16105
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 17 deletions.
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ jobs:
arguments: --all-features
```
### Use specific Rust version
```yaml
name: CI
on: [push, pull_request]
jobs:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
rust-version: "1.59.0"
log-level: warn
command: check
arguments: --all-features
```
### Recommended pipeline to avoid sudden breakages
```yaml
Expand Down Expand Up @@ -77,20 +95,20 @@ jobs:
Repositories using this action (PR to add your repo):
- [ash-molten](https://github.com/EmbarkStudios/ash-molten)
- [asn1rs](https://github.com/kellerkindt/asn1rs)
- [cargo-about](https://github.com/EmbarkStudios/cargo-about)
- [cargo-fetcher](https://github.com/EmbarkStudios/cargo-fetcher)
- [glam-rs](https://github.com/bitshifter/glam-rs)
- [linkerd2-proxy](https://github.com/linkerd/linkerd2-proxy)
- [PackSquash](https://github.com/ComunidadAylas/PackSquash)
- [physx-rs](https://github.com/EmbarkStudios/physx-rs)
- [smush](https://github.com/gwihlidal/smush-rs)
- [tame-gcs](https://github.com/EmbarkStudios/tame-gcs)
- [tame-oauth](https://github.com/EmbarkStudios/tame-oauth)
- [texture-synthesis](https://github.com/EmbarkStudios/texture-synthesis)
- [tonic](https://github.com/hyperium/tonic)
- ⚡️[dotenv-linter](https://github.com/dotenv-linter/dotenv-linter)
* [ash-molten](https://github.com/EmbarkStudios/ash-molten)
* [asn1rs](https://github.com/kellerkindt/asn1rs)
* [cargo-about](https://github.com/EmbarkStudios/cargo-about)
* [cargo-fetcher](https://github.com/EmbarkStudios/cargo-fetcher)
* [glam-rs](https://github.com/bitshifter/glam-rs)
* [linkerd2-proxy](https://github.com/linkerd/linkerd2-proxy)
* [PackSquash](https://github.com/ComunidadAylas/PackSquash)
* [physx-rs](https://github.com/EmbarkStudios/physx-rs)
* [smush](https://github.com/gwihlidal/smush-rs)
* [tame-gcs](https://github.com/EmbarkStudios/tame-gcs)
* [tame-oauth](https://github.com/EmbarkStudios/tame-oauth)
* [texture-synthesis](https://github.com/EmbarkStudios/texture-synthesis)
* [tonic](https://github.com/hyperium/tonic)
* ⚡️[dotenv-linter](https://github.com/dotenv-linter/dotenv-linter)
## Contributing
Expand All @@ -102,8 +120,8 @@ Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
at your option.
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ inputs:
description: "The log level for cargo-deny"
required: false
default: "warn"
rust-version:
description: "The Rust version that is updated to before running cargo deny"
required: false
default: ""

runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.rust-version }}
- --log-level
- ${{ inputs.log-level }}
- ${{ inputs.arguments }}
Expand Down
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/sh -l
set -e

PATH=$PATH:/usr/local/cargo/bin

cargo-deny $*
if [ -n "$1" ]
then
rustup set profile minimal
rustup default "$1"
fi

shift

cargo-deny "$@"

0 comments on commit 8b16105

Please sign in to comment.