ostree/.github/workflows/rust.yml
Benjamin Gilbert d9483f89ad workflows: limit permissions to reading repo contents
Move the existing docs permissions stanza to the top of the workflow for
consistency.
2021-07-28 18:32:04 -04:00

32 lines
619 B
YAML

---
name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
ACTIONS_LINTS_TOOLCHAIN: 1.53.0
jobs:
linting:
name: "Lints, pinned toolchain"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env['ACTIONS_LINTS_TOOLCHAIN'] }}
default: true
components: rustfmt, clippy
- name: cargo fmt (check)
run: cargo fmt -- --check -l