Skip to content

Commit 1ce6c3e

Browse files
committed
Try again
1 parent a17ee45 commit 1ce6c3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/dockerfile_version_check.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
steps:
1414
# Checkout the code
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19+
sparse-checkout: docker/
1920

2021
# Fetch base branch (e.g., 'main') for comparison
2122
- name: Fetch base branch for comparison
@@ -55,7 +56,8 @@ jobs:
5556
IFS='.' read -r current_major current_minor current_patch <<< "$version_on_main"
5657
5758
# Check if the image version for this image_name has been incremented in this PR
58-
version_this_branch=$(git diff origin/${{ github.base_ref }}...HEAD -- docker-compose.yaml | grep -oP "image: .*/$image_name:v\K[0-9]+\.[0-9]+\.[0-9]+") || echo "No version increment found."
59+
# version_this_branch=$(git diff origin/${{ github.base_ref }}...HEAD -- docker-compose.yaml | grep -oP "image: .*/$image_name:v\K[0-9]+\.[0-9]+\.[0-9]+") || echo "No version increment found."
60+
version_this_branch=$(grep -oP "image: .*/$image_name:v\K[0-9]+\.[0-9]+\.[0-9]+" docker-compose.yaml)
5961
6062
if [ -z "$version_this_branch" ]; then
6163
echo "::error::Dockerfile for $image_name was modified but image version in docker-compose.yaml was not updated."

0 commit comments

Comments
 (0)