Skip to content

Commit

Permalink
Add workflow for make gotidy CI check (#9713)
Browse files Browse the repository at this point in the history
  • Loading branch information
damemi authored May 4, 2022
1 parent f8a726c commit d67d622
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/gotidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This action requires that PRs run `make gotidy` to ensure
# dependencies are up to date in reaction to any changes

name: gotidy

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main

jobs:
gotidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for go mod dependency changes
run: |
make gotidy
if [[ $(git diff --name-only | grep go\.mod) || $(git diff --name-only | grep go\.sum) ]]
then
echo "go.mod/go.sum deps changes detected."
echo "Please run `make gotidy`"
false
else
echo "No go module changes detected."
fi

0 comments on commit d67d622

Please sign in to comment.