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

Docs: simplier set up for GitHub actions #146

Closed
IvanGoncharov opened this issue May 28, 2022 · 1 comment
Closed

Docs: simplier set up for GitHub actions #146

IvanGoncharov opened this issue May 28, 2022 · 1 comment

Comments

@IvanGoncharov
Copy link

IvanGoncharov commented May 28, 2022

Currently, docs suggest this setup

name: Lint GitHub Actions workflows
on: [push, pull_request]

jobs:
  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Download actionlint
        id: get_actionlint
        run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
        shell: bash
      - name: Check workflow files
        run: ${{ steps.get_actionlint.outputs.executable }} -color
        shell: bash

But I found you can do it way simpler with 2 steps instead of 3 and with caching:

name: Lint GitHub Actions workflows
on: [push, pull_request]

jobs:
  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Check workflow files
        uses: docker://rhysd/actionlint:latest
        with:
          args: -color
@rhysd
Copy link
Owner

rhysd commented Aug 12, 2022

That would be also good way to use actionlint on CI though preparing Docker image would takes a bit longer. I'll add it to document.

@rhysd rhysd closed this as completed in 0b86cab Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants