Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation tweaks + document alternative #3

Merged
merged 2 commits into from
Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
- name: 🚀 Run yamllint
uses: frenck/action-yamllint@main
uses: frenck/action-yamllint@v1
```

## Arguments
Expand Down Expand Up @@ -68,7 +68,7 @@ This example runs yamllint only on the YAML files located in the `src` folder.

```yaml
- name: 🚀 Run yamllint
uses: frenck/action-yamllint@main
uses: frenck/action-yamllint@v1
with:
config: "src/"
```
Expand All @@ -80,7 +80,7 @@ the action to raise an failure, even when only warnings are found.

```yaml
- name: 🚀 Run yamllint
uses: frenck/action-yamllint@main
uses: frenck/action-yamllint@v1
with:
strict: true
```
Expand All @@ -93,11 +93,46 @@ of warnings using the `warnings` argument.

```yaml
- name: 🚀 Run yamllint
uses: frenck/action-yamllint@main
uses: frenck/action-yamllint@v1
with:
warnings: false
```

## Alternative

The funny part is, you don't need an GitHub Action specifically for yamllint.
yamllint is by default available on the GitHub's Action runners.

So you can do this alternatively:

```yaml
name: Lint
on: [push, pull_request]
jobs:
build:
name: ✅ yamllint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
- name: 🚀 Run yamllint
run: |
yamllint .
```

And... The above example, is faster, as it doesn't have a startup time, making
it around 5-10 seconds faster.

So, why this action?!

The action is version controlled and can be updated independently from GitHub's
runners. It prevents surprises, and using dependabot, you can actually know
when an upgrade happens.

Which version runs on the GitHub runner? And tomorrow?

Nevertheless, it is good to know the alternatives 😉

## Changelog & Releases

This repository keeps a change log using [GitHub's releases][releases]
Expand Down