All checks were successful
Build and Push Docker Image / build (push) Successful in 1m59s
19 lines
525 B
Bash
Executable File
19 lines
525 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Loop through each directory in the builds directory
|
|
for dir in builds/*/ ; do
|
|
# Remove trailing slash from directory name
|
|
dir=${dir%/}
|
|
|
|
# Extract the folder name
|
|
folder_name=$(basename $dir)
|
|
|
|
# Build the Docker image
|
|
docker build -t caddy-$folder_name $dir
|
|
|
|
# Tag the Docker image for pushing to the repository
|
|
docker tag caddy-$folder_name linloir/caddy-$folder_name
|
|
|
|
# Push the Docker image to the repository
|
|
docker push linloir/caddy-$folder_name
|
|
done |