File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 13
13
steps :
14
14
# Checkout the code
15
15
- name : Checkout code
16
- uses : actions/checkout@v3
16
+ uses : actions/checkout@v4
17
17
with :
18
18
fetch-depth : 0
19
+ sparse-checkout : docker/
19
20
20
21
# Fetch base branch (e.g., 'main') for comparison
21
22
- name : Fetch base branch for comparison
55
56
IFS='.' read -r current_major current_minor current_patch <<< "$version_on_main"
56
57
57
58
# 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)
59
61
60
62
if [ -z "$version_this_branch" ]; then
61
63
echo "::error::Dockerfile for $image_name was modified but image version in docker-compose.yaml was not updated."
You can’t perform that action at this time.
0 commit comments