├── .gitignore ├── entrypoint.sh ├── integration-test ├── src │ └── lib.rs ├── Cargo.toml └── Cargo.lock ├── action.yml ├── .github └── workflows │ └── example.yml ├── LICENSE ├── Dockerfile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | *.iml 3 | 4 | **/target 5 | **/*.rs.bk 6 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -u -o pipefail 4 | 5 | cd $GITHUB_WORKSPACE 6 | 7 | echo "Run: $*" 8 | 9 | bash -c "$*" 10 | -------------------------------------------------------------------------------- /integration-test/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | #[test] 4 | fn it_works() { 5 | assert_eq!(2 + 2, 4); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /integration-test/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-action" 3 | version = "0.1.0" 4 | authors = ["Stefan Ruzitschka "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | -------------------------------------------------------------------------------- /integration-test/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "rust-action" 5 | version = "0.1.0" 6 | 7 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Rust Action" 2 | description: "'Silverbullet' for a quickstart Rust CI based upon Github Actions" 3 | author: "Stefan Ruzitschka" 4 | branding: 5 | icon: "play-circle" 6 | color: "gray-dark" 7 | runs: 8 | using: "docker" 9 | image: "Dockerfile" 10 | -------------------------------------------------------------------------------- /.github/workflows/example.yml: -------------------------------------------------------------------------------- 1 | name: Quickstart 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v1 11 | - uses: icepuma/rust-action@master 12 | with: 13 | args: cd integration-test && cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:1.68.0 2 | 3 | LABEL "com.github.actions.name"="Rust Action" 4 | LABEL "com.github.actions.description"="'Silverbullet' for a quickstart Rust CI based upon Github Actions" 5 | LABEL "com.github.actions.icon"="play-circle" 6 | LABEL "com.github.actions.color"="gray-dark" 7 | 8 | RUN rustup component add clippy-preview 9 | RUN rustup component add rustfmt-preview 10 | 11 | RUN cargo install cargo-release 12 | 13 | RUN apt-get update && apt-get install -y \ 14 | cmake \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | COPY entrypoint.sh /entrypoint.sh 18 | ENTRYPOINT ["/entrypoint.sh"] 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust Github Action 2 | 3 | :warning: Action is deprecated, please use [rust-action](https://github.com/Mirlahiji/rust-action). 4 | Thanks to [Mirlahiji](https://github.com/Mirlahiji) for taking over the project :heart: 5 | 6 | 'Silverbullet' for a quickstart Rust CI based upon [Github Actions](https://developer.github.com/actions/) 7 | 8 | *What's inside the "box":* 9 | 10 | * Rust 1.68.0 11 | * Rustfmt 12 | * Clippy 13 | * Cargo Release 14 | * cmake - Thanks @ [bwasty](https://github.com/bwasty) 15 | 16 | # Usage 17 | 18 | In a file inside `.github/workflows/quickstart.yml` 19 | 20 | ```yaml 21 | name: Rust Example 22 | 23 | on: [push] 24 | 25 | jobs: 26 | build: 27 | runs-on: ubuntu-latest 28 | 29 | steps: 30 | - uses: actions/checkout@v1 31 | - uses: icepuma/rust-action@master 32 | with: 33 | args: cd integration-test && cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test 34 | ``` 35 | --------------------------------------------------------------------------------