Skip to content

Commit cee5b9f

Browse files
author
Greg Bowler
authored
Merge pull request #11 from OriHoch/patch-1
prevent failure of script due to missing permissions to push Docker image
2 parents 504f80e + 99ae2f6 commit cee5b9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

php-build.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,7 @@ echo "$dockerfile" >> output.log 2>&1
110110
docker build --tag "$docker_tag" --cache-from "$docker_tag" --file Dockerfile-php-build . >> output.log 2>&1
111111
# Update the user's repository with the customised docker image, ready for the
112112
# next Github Actions run.
113-
docker push "$docker_tag" >> output.log 2>&1
113+
if ! docker push "$docker_tag" >> output.log 2>&1; then
114+
echo "WARNING: Failed to push Docker image to \"$docker_tag\", this is probably due to missing permissions on GitHub." >> output.log 2>&1
115+
echo "Will continue as this is just an optimization to improve speed of next build." >> output.log 2>&1
116+
fi

0 commit comments

Comments
 (0)