chore: Update Dockerfile to build and push only changed Docker images
Build and Push Docker Images / build-and-push (push) Successful in 1m56s

This commit is contained in:
Bram Kelchtermans
2024-07-31 14:06:30 +02:00
parent ac88d94286
commit 58d2f4a9ee
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@@ -31,7 +33,7 @@ jobs:
if [ -d "Dockers/$dir" ]; then
image_name=$(basename "$dir")
version=$(cat "Dockers/$dir/version")
docker build -t $DOCKER_HUB_USERNAME/$image_name:$version "Dockers/$dir"
docker push $DOCKER_HUB_USERNAME/$image_name:$version
docker build -t $DOCKER_HUB_USERNAME/$dir:$version "Dockers/$dir"
docker push $DOCKER_HUB_USERNAME/$dir:$version
fi
done
+1 -1
View File
@@ -1 +1 @@
3.0
3.1