30
30
- id : todo
31
31
if : fromJson(steps.release-please.outputs.releases_created)
32
32
run : |
33
- for x in ${{join(fromJson(steps.release-please.outputs.paths_released), ' ')}} ; do
33
+ <<<"$RELEASED_PATHS" jq -r '.[]'| while IFS= read -r x ; do
34
34
case "$x" in
35
35
lib/ocrypto)
36
36
echo "TO_UPDATE=['examples','sdk','service']">>"$GITHUB_OUTPUT"
60
60
;;
61
61
esac
62
62
done
63
-
63
+ env :
64
+ RELEASED_PATHS : ${{ toJson(steps.release-please.outputs.paths_released) }}
64
65
update-go-mods :
65
66
runs-on : ubuntu-latest
66
67
needs :
@@ -78,15 +79,15 @@ jobs:
78
79
- run : |
79
80
git checkout -b update-go-mods-for-${{matrix.path}}
80
81
git push -f -u origin update-go-mods-for-${{matrix.path}}
81
- cd ${{matrix.path}}
82
- for x in ${{join(fromJson(needs.release-please.outputs.paths_released), ' ')}} ; do
83
- export pkg=github.com/opentdf/platform/${x}
82
+ cd ${{matrix.path}} || exit 1
83
+ <<<"$RELEASED_PATHS" jq -r '.[]'| while IFS= read -r x ; do
84
+ export pkg=" github.com/opentdf/platform/${x}"
84
85
if go mod edit --json | jq -e '.Replace[] | select(.Old.Path == env.pkg)'; then
85
- go mod edit --dropreplace=$pkg
86
+ go mod edit --dropreplace=" $pkg"
86
87
fi
87
88
echo "Should we update [${pkg}] in [${{ matrix.path }}]?"
88
89
if go mod edit --json | jq -e '.Require[] | select(.Path == env.pkg)'; then
89
- ver=$(jq -r .\[\"${x}\"\] < "${GITHUB_WORKSPACE}/.release-please-manifest.json")
90
+ ver=" $(jq -r --arg x "$x" '.[$x]' < "${GITHUB_WORKSPACE}" /.release-please-manifest.json)"
90
91
echo "go get ${pkg}@v${ver}"
91
92
go get "${pkg}@v${ver}"
92
93
fi
99
100
git diff
100
101
env:
101
102
GONOSUMDB: github.com/opentdf/platform/${{join(fromJson(needs.release-please.outputs.paths_released), ',github.com/opentdf/platform/')}}
103
+ RELEASED_PATHS: ${{ toJson(needs.release-please.outputs.paths_released) }}
102
104
- uses : planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5
103
105
with :
104
106
commit_message : " fix(core): Autobump ${{ matrix.path }}"
0 commit comments