Skip to content

pollenjp/setup-shfmt

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

setup-shfmt

  • Install shfmt and cache it for GitHub Actions
  • Caching makes it especially efficient when using self-hosted runners

Usage

jobs:
  shfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: pollenjp/setup-shfmt@v1
        with:
          version: latest
          # version: 3.10.0
      - uses: actions/checkout@v4
      - name: Run shfmt
        run: shfmt -d .

If you use GitHub Enterprise Server, set the specific version (X.Y.Z), or set github-token empty and version: latest.

jobs:
  shellcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: pollenjp/setup-shfmt@v1
        with:
          version: 3.10.0
          #
          #or
          #
          # version: latest  # 'latest' requests GitHub API (github.com)
          # github-token: '' # Empty token may result in reaching the rate limit
          #                  # for anonymous requests
      - uses: actions/checkout@v4
      - name: Run shfmt
        run: shfmt -d .

Compare with other actions