Skip to content

Commit efc03ed

Browse files
authored
ci: use Ubuntu shfmt shell formatter (#2583)
1 parent 53252ee commit efc03ed

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/shfmt.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
pull_request:
55
paths:
66
- '**/*.sh'
7-
- '.github/workflows/shfmt.yml'
7+
- .github/workflows/shfmt.yml
8+
workflow_dispatch:
89

910
permissions:
1011
contents: read
@@ -14,8 +15,12 @@ jobs:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
17-
- run: docker run -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci .
18-
- run: git diff --color --exit-code
18+
- name: Install shfmt
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y shfmt
22+
- name: Run shfmt
23+
run: shfmt -sr -i 2 -l -w -ci -d .
1924

2025
shellcheck:
2126
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)