From 7ba94b93154693d3e513d10ad2933dbf3265381a Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Fri, 19 Jul 2024 20:23:20 +0200 Subject: [PATCH] Change SMTP port from 25 to 2525 for GH Actions only (#111) --- .github/workflows/docker-compose-build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-compose-build.yml b/.github/workflows/docker-compose-build.yml index ab99a7a15..e79e70e14 100644 --- a/.github/workflows/docker-compose-build.yml +++ b/.github/workflows/docker-compose-build.yml @@ -21,7 +21,8 @@ jobs: ./init.sh - name: Set up Docker Compose run: | - # Build the images and start the services + # Change the exposed host port of the SmtpService from 25 to 2525 because port 25 is not allowed in GitHub Actions + sed -i 's/25:25/2525:25/' docker-compose.yml docker compose -f docker-compose.yml up -d - name: Wait for services to be up run: | @@ -47,13 +48,13 @@ jobs: else echo "Service responded with $http_code" fi - - name: Test if localhost:25 (SmtpService) responds + - name: Test if localhost:2525 (SmtpService) responds run: | - # Test if the service on localhost:25 responds - response=$(curl -s --connect-timeout 5 localhost:25) + # Test if the service on localhost:2525 responds + response=$(curl -s --connect-timeout 5 localhost:2525) if [ -z "$response" ]; then - echo "SmtpService did not respond on port 25. Check if the SmtpService service is running." + echo "SmtpService did not respond on port 2525. Check if the SmtpService service is running." exit 1 else - echo "SmtpService responded on port 25" + echo "SmtpService responded on port 2525" fi