From 212a1c7544dd8512085a9501f328abceea29ee3d Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Tue, 7 Nov 2023 06:06:48 -0600 Subject: [PATCH] update --- .github/workflows/mod-tidy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mod-tidy.yml b/.github/workflows/mod-tidy.yml index 79368c5f..510e7a18 100644 --- a/.github/workflows/mod-tidy.yml +++ b/.github/workflows/mod-tidy.yml @@ -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 @@ -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 }}