File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,16 @@ jobs:
19
19
run : |
20
20
echo "GitHub PR action type: ${{ github.event.action }}"
21
21
echo "Checking if the PR modifies the Dockerfile"
22
- if git diff --quiet ${{ github.event.before }} ${{ github.event.after }} Dockerfile; then
23
- echo "PR synchronized/opened, but Dockerfile was not edited. Not rebuilding the image."
22
+ echo "GitHub event before: ${{ github.event.before }}"
23
+ echo "GitHub event before: ${{ github.event.after }}"
24
+ git diff --quiet ${{ github.event.before }} ${{ github.event.after }} Dockerfile
25
+ DIFFSTATUS=$?
26
+ echo "Diff (1 if diff, 0 if not): $DIFFSTATUS"
27
+ if [ $DIFFSTATUS -eq 0 ]; then
28
+ echo "PR synchronized, but Dockerfile was not edited. Not rebuilding the image."
24
29
echo "stale_dockerfile=false" >> "$GITHUB_OUTPUT"
25
30
else
26
- echo "PR synchronized/opened , and Dockerfile was edited, so rebuilding the image."
31
+ echo "PR synchronized, and Dockerfile was edited, so rebuilding the image."
27
32
echo "stale_dockerfile=true" >> "$GITHUB_OUTPUT"
28
33
fi
29
34
- name : Rebuild and publish image
You can’t perform that action at this time.
0 commit comments