docs: Simplify GitHub Actions example

pull/486/head
Andrew Imeson 3 years ago
parent ae3158cd1f
commit f42e6743e6
No known key found for this signature in database
GPG Key ID: 82A3DCD89FC9E016

@ -22,29 +22,22 @@ Integration with GitHub Actions
------------------------------- -------------------------------
yamllint auto-detects when it's running inside of `GitHub yamllint auto-detects when it's running inside of `GitHub
Actions <https://github.com/features/actions>`_ and automatically uses the suited Actions <https://github.com/features/actions>`_ and automatically uses the
output format to decorate code with linting errors. You can also force the suited output format to decorate code with linting errors. You can also force
GitHub Actions output with ``yamllint --format github``. the GitHub Actions output with ``yamllint --format github``.
An example workflow using GitHub Actions: An minimal example workflow using GitHub Actions:
.. code:: yaml .. code:: yaml
--- ---
name: yamllint test on: push # yamllint disable-line rule:truthy
on: push
jobs: jobs:
test: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install yamllint - name: Install yamllint
run: pip install yamllint run: pip install yamllint

Loading…
Cancel
Save