Skip to content

Commit 9058937

Browse files
authored
Fix grep for version number in docker build (#15699)
Grep now only returns _first_ result and "version" has to be at start of line.
1 parent b5ffb40 commit 9058937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/build-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
env:
5252
TAG: ${{ inputs.plan != '' && fromJson(inputs.plan).announcement_tag || 'dry-run' }}
5353
run: |
54-
version=$(grep "version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
54+
version=$(grep -m 1 "^version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
5555
if [ "${TAG}" != "${version}" ]; then
5656
echo "The input tag does not match the version from pyproject.toml:" >&2
5757
echo "${TAG}" >&2

0 commit comments

Comments
 (0)