From 7780803a0ccdfd473e431e4f009113731beb5e79 Mon Sep 17 00:00:00 2001 From: Jacob Sanford Date: Thu, 13 Jul 2023 09:55:45 -0300 Subject: [PATCH] Add protected tags to build --- .github/workflows/build-image.yaml | 3 ++- build/scripts/pre-init.d/96_add_bad_bots.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 build/scripts/pre-init.d/96_add_bad_bots.sh diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index c0a1ed9..f224d90 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -10,8 +10,9 @@ jobs: uses: unb-libraries/dockworker-baseimage/.github/workflows/build-base-image.yaml@6.x with: image-name: ghcr.io/unb-libraries/drupal + protected-tags: '8.x-3.x,9.x-2.x,9.x-2.x-unblib,10.x-1.x,10.x-1.x-unblib' secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} GH_CONTAINER_REGISTRY_TOKEN: ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }} GH_CONTAINER_REGISTRY_USER: ${{ secrets.GH_CONTAINER_REGISTRY_USER }} - + diff --git a/build/scripts/pre-init.d/96_add_bad_bots.sh b/build/scripts/pre-init.d/96_add_bad_bots.sh new file mode 100755 index 0000000..de15133 --- /dev/null +++ b/build/scripts/pre-init.d/96_add_bad_bots.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# Update config values. +sed -i "s|APP_HOSTNAME|$APP_HOSTNAME|g" /etc/postfix/main.cf + +# Use Mailhog for Local Development +if [ "$DEPLOY_ENV" = "local" ]; then + echo "Configuring postfix to use mailhog..." + sed -i "s/relayhost = .*/relayhost = mailhog:1025/g" /etc/postfix/main.cf +fi + +postfix start