Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/devcontainer-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
GOMOD_VERSION=$(grep '^go ' go.mod | awk '{print $2}')
GOMOD_MAJOR_MINOR=$(echo "$GOMOD_VERSION" | grep -oE '^[0-9]+\.[0-9]+')

# Extract the Go version from the Dockerfile base image tag
DOCKERFILE_TAG=$(grep -oP 'devcontainers/go:\K[0-9]+\.[0-9]+' .devcontainer/Dockerfile)
# Extract the Go version from the Dockerfile base image tag.
# Accept both the legacy form (go:1.26-bookworm) and the variant-prefixed
# form (go:2-1.26-bookworm) published on mcr.microsoft.com.
DOCKERFILE_TAG=$(grep -oP 'devcontainers/go:(?:[0-9]+-)?\K[0-9]+\.[0-9]+' .devcontainer/Dockerfile)

echo "go.mod requires: go ${GOMOD_VERSION} (major.minor: ${GOMOD_MAJOR_MINOR})"
echo "Dockerfile base image: go:${DOCKERFILE_TAG}"
Expand Down