Skip to content

Commit b3d840e

Browse files
committed
feat(ci): read Go version from go-versions.yml for system-tests weblog build
Read the stable Go version from the local go-versions.yml (checked out at binaries/dd-trace-go) and pass it as GO_VERSION to build.sh, which forwards it as --build-arg GO_VERSION to docker buildx build. This wires dd-trace-go's single source of truth into the system-tests weblog Docker build, so Go version bumps in go-versions.yml automatically propagate to the container image without a manual PR. Companion PR: DataDog/system-tests#6350 Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
1 parent 1b6e030 commit b3d840e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/system-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,23 @@ jobs:
167167
ref: ${{ inputs.branch_ref || github.ref }}
168168
path: 'binaries/dd-trace-go'
169169

170+
- name: Read Go versions
171+
id: go-versions
172+
shell: bash
173+
run: |
174+
file="binaries/dd-trace-go/go-versions.yml"
175+
stable=$(grep '^stable:' "$file" | sed 's/.*"\(.*\)".*/\1/')
176+
if [[ -z "$stable" ]]; then
177+
echo "ERROR: Failed to parse stable version from ${file}" >&2
178+
exit 1
179+
fi
180+
echo "stable=${stable}" >> "$GITHUB_OUTPUT"
181+
echo "Go stable version: ${stable}"
182+
170183
- name: Build weblog
171184
run: ./build.sh -i weblog
185+
env:
186+
GO_VERSION: ${{ steps.go-versions.outputs.stable }}
172187

173188
- name: Build runner
174189
uses: ./.github/actions/install_runner

0 commit comments

Comments
 (0)