-
Notifications
You must be signed in to change notification settings - Fork 11
/
action.yml
36 lines (31 loc) · 1.27 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Rust Marker Linter
description: GitHub Action to install and run the Marker linter for Rust 🦀
branding:
icon: edit-3
color: white
inputs:
install-only:
description: >
If set to `true` then the action will only install `cargo marker`,
and will skip running `cargo marker`. Use this if you want to run
something more complex than just `cargo marker`. If you think there
may be a frequent use case for running a different command then we will be
glad if you open a feature request issue for that to extend the action input
parameters.
default: 'false'
required: false
runs:
using: composite
steps:
- run: ${GITHUB_ACTION_PATH:?}/scripts/release/install.${{ runner.os == 'Windows' && 'ps1' || 'sh' }}
shell: bash
# Run the check with `--locked` only if there is a `Cargo.lock` file present in the
# repository. Not everyone checks in the `Cargo.lock` file into the version control,
# but if they do they would want this command to run with `--locked` to ensure that
# the lock file is up to date.
- run: |
cargo marker -- --all-targets --all-features${{
hashFiles('./Cargo.lock') != '' && ' --locked' || ''
}}
if: ${{ inputs.install-only == 'false' }}
shell: bash