Add image #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
name: Check out code | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
- name: List all changed files | |
run: | | |
function build_and_publish(){ | |
USER=$1 | |
REPO=$2 | |
TAG=$3 | |
REPO_TWO=$4 | |
TAG_TWO=$5 | |
IMAGE="$1/$REPO:$TAG" | |
IMAGE_TWO="$1/$REPO_TWO:$TAG_TWO" | |
docker build -t $IMAGE -t $IMAGE_TWO - < "./dockerfiles/$TAG.Dockerfile" | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
docker push $IMAGE | |
docker push $IMAGE_TWO | |
} | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
echo "$file was changed" | |
CHECKFILE="dockerfiles/deb11-p74-n10-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p74-n10-c2212" "debian-11-php7.4-c2212" "node10" | |
fi | |
CHECKFILE="dockerfiles/deb11-p74-n10-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p74-n10-c233" "debian-11-php7.4" "node10" | |
fi | |
CHECKFILE="dockerfiles/deb11-p80-n12-c207.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p80-n12-c207" "debian-11-php8.0" "node12" | |
fi | |
CHECKFILE="dockerfiles/deb11-p80-n12-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p80-n12-c2212" "debian-11-php8.0" "node12" | |
fi | |
CHECKFILE="dockerfiles/deb11-p80-nna-c207.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p80-nna-c207" "debian-11-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/deb11-p80-nna-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p80-nna-c2212" "debian-11-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u1804-p74-n10-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p74-n10-c233" "ubuntu-18.04-php7.4" "node10" | |
fi | |
CHECKFILE="dockerfiles/u1804-p74-n14-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p74-n14-c233" "ubuntu-18.04-php7.4" "node14" | |
fi | |
CHECKFILE="dockerfiles/u1804-p74-nna-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p74-nna-c233" "ubuntu-18.04-php7.4" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u1804-p80-n12-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p80-n12-c233" "ubuntu-18.04-php8.0" "node12" | |
fi | |
CHECKFILE="dockerfiles/u1804-p80-n14-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p80-n14-c233" "ubuntu-18.04-php8.0" "node14" | |
fi | |
CHECKFILE="dockerfiles/u1804-p80-nna-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p80-nna-c2212" "ubuntu-18.04-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u1804-p80-nna-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p80-nna-c233" "ubuntu-18.04-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u1804-p81-n12-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p81-n12-c233" "ubuntu-18.04-php8.1" "node12" | |
fi | |
CHECKFILE="dockerfiles/u1804-p81-nna-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p81-nna-c233" "ubuntu-18.04-php8.1" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-n12-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-n12-c233" "ubuntu-20.04-php8.0" "node12" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-n14-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-n14-c233" "ubuntu-20.04-php8.0" "node14" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-nna-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-nna-c233" "ubuntu-20.04-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u2004-p81-n12-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p81-n12-c233" "ubuntu-20.04-php8.1" "node12" | |
fi | |
CHECKFILE="dockerfiles/u2004-p81-nna-c233.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p81-nna-c233" "ubuntu-20.04-php8.1" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-n14-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-n14-c2212" "ubuntu-20.04-php8.0" "node14" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-nna-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-nna-c2212" "ubuntu-20.04-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u2004-p80-n10-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2004-p80-n10-c2212" "ubuntu-20.04-php8.0" "node10" | |
fi | |
CHECKFILE="dockerfiles/u1804-p80-n10-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u1804-p80-n10-c2212" "ubuntu-18.04-php8.0" "node10" | |
fi | |
CHECKFILE="dockerfiles/deb11-p80-n10-c2212.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "deb11-p80-n10-c2212" "debian-11-php8.0" "node10" | |
fi | |
CHECKFILE="dockerfiles/u2204-p80-n16-c2218.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2204-p80-n16-c2218" "ubuntu-22.04-php8.0" "node16" | |
fi | |
CHECKFILE="dockerfiles/u2204-p80-nna-c2218.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2204-p80-nna-c2218" "ubuntu-22.04-php8.0" "nonode" | |
fi | |
CHECKFILE="dockerfiles/u2204-p81-n16-c2218.Dockerfile" | |
if [ $file == "$CHECKFILE" ] || [ $file == ".build_and_publish_all" ]; then | |
build_and_publish "binbiriz" "drupal" "u2204-p81-n16-c2218" "ubuntu-22.04-php8.1" "node16" | |
fi | |
done |