Skip to content

Commit

Permalink
Lint & Format workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Dec 18, 2024
1 parent 9fb3b31 commit e2f00af
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/lint-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Lint & Format
on:
pull_request:
paths:
- "**.sh"
- ".github/workflows/*.yaml"
- "action.yaml"
- "gha_extract_shell_scripts.py"

jobs:
workflow-scripts:
name: Extract workflow scripts
runs-on: ubuntu-latest
# These permissions are needed to:
# - Checkout the Git repo (`contents: read`)
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Extract workflow shell scripts
id: extract
uses: ./
- uses: actions/upload-artifact@v4
with:
name: workflow-scripts
path: ${{ steps.extract.outputs.output-dir }}

lint-format:
name: Lint & Format
needs: workflow_scripts
# These permissions are needed to:
# - Checkout the Git repo (`contents: read`)
# - Post a comments on PRs: https://github.com/luizm/action-sh-checker#secrets
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download workflow scripts
uses: actions/download-artifact@v4
with:
name: workflow-scripts
- uses: luizm/action-sh-checker@c6edb3de93e904488b413636d96c6a56e3ad671a # v0.8.0
with:
sh_checker_comment: true

0 comments on commit e2f00af

Please sign in to comment.