ci: use new -C flag of Go subcommands

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-02-06 17:47:57 +01:00
parent e011a20c49
commit 955316c661
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ jobs:
echo "::group::Install go dependencies"
mods=$(go list -f '{{.Dir}}' -m | xargs)
for mod in $mods; do
(cd "$mod" || exit; go mod download)
go mod download -C "$mod"
done
echo "::endgroup::"

View File

@ -49,4 +49,4 @@ jobs:
shell: bash
run: |
go install golang.org/x/vuln/cmd/govulncheck@6ad3e3d0781578532aaedbed543b25d7d586c746 # v0.0.0-20230110180137-6ad3e3d07815
GOMEMLIMIT=5GiB govulncheck "$(go list -f '{{.Dir}}/...' -m | xargs)"
GOMEMLIMIT=5GiB govulncheck "${{ steps.submods.outputs.submods }}"

View File

@ -63,7 +63,7 @@ jobs:
run: |
mods="${{ steps.submods.outputs.submods }}"
for mod in $mods; do
(cd "$mod"; go mod tidy)
go mod tidy -C "$mod"
done
- name: Push changes