Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dezren39 committed Nov 7, 2023
1 parent 2e6b7b4 commit 212a1c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/mod-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ jobs:

- name: Tidy Go modules in multiple directories
run: |
set -ex -o pipefail
dirs=("src/graph")
for dir in "${dirs[@]}"; do
if [[ -d "$dir" && -f "$dir/go.mod" ]]; then
echo "Running go mod tidy in $dir"
(cd "$dir" && go mod tidy)
echo "Running go mod tidy && go generate in $dir"
(cd "$dir" && go mod tidy -compat=1.17 && go generate ./...)
else
echo "Skipping $dir as it does not contain a go.mod file."
exit 1
Expand All @@ -81,5 +84,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Maintain: Update go.mod and generated files'
branch: ${{ github.ref }}
file_pattern: sources/graph/go.mod sources/graph/go.sum # Add other paths that might have changed due to go generate
branch: ${{ github.head_ref }}

0 comments on commit 212a1c7

Please sign in to comment.