Skip to content

Commit

Permalink
Allow overriding of VERSION_CMD for tests (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon authored Jan 11, 2025
1 parent 65de123 commit dda8103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ jobs:
PROJECT_BIN=$(yq '.services.node.build.args.PROJECT_BIN // ""' ./build.yml)
PROJECT_BIN="${PROJECT_BIN:-$PROJECT}"
VERSION=$(yq '.services.node.build.args.VERSION' ./build.yml)
VERSION_STRING=$(docker run --platform=linux/amd64 --entrypoint='' $PROJECT $PROJECT_BIN version 2>&1 || true)
VERSION_CMD=$(yq '.services.node.build.args.VERSION_CMD // ""' ./build.yml)
VERSION_CMD="${VERSION_CMD:-$PROJECT_BIN version}"
VERSION_STRING=$(docker run --platform=linux/amd64 --entrypoint='' $PROJECT $VERSION_CMD 2>&1 || true)
if ! echo "v$VERSION_STRING" | grep -q "$VERSION"; then
echo "Version mismatch: '$VERSION_STRING' does not contain $VERSION"
Expand Down

0 comments on commit dda8103

Please sign in to comment.