Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsam committed Jul 10, 2023
1 parent 76127d8 commit de288cd
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ name: 'gofmt'

on: [workflow_call]

permissions:
contents: read

jobs:
gofmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: gofmt
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
gofmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: gofmt
run: |
gofmt_out="$(gofmt -s -l .)"
echo ${gofmt_out}
if [ ! -z ${gofmt_out} ]; then
echo "[ERROR] Files failing gofmt: "
echo "${gofmt_out}"
exit 1;
fi

0 comments on commit de288cd

Please sign in to comment.