diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 57f3ec8e..50f4d122 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -4,7 +4,7 @@ on: [push] jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout repository @@ -19,14 +19,19 @@ jobs: - name: Run Docker container run: docker run -d --name antmedia --network=host -it antmediaserver - - name: Download enable_ssl.sh inside container - run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/21b57c461ba8eae496b830e779d2c628f25aecce/src/main/server/enable_ssl.sh - + - name: Clone branch + run: | + git clone --depth=1 -b ${{ inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git + + - name: Copy enable_ssl.sh from cloned branch to container + run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh + - name: Run enable_ssl.sh inside container run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh - name: Verify container is running run: | + sleep 20 docker ps -f name=antmedia if [ $(docker ps -f name=antmedia --format '{{.Names}}') != "antmedia" ]; then echo "Container is not running" @@ -35,8 +40,7 @@ jobs: - name: Test application run: | - docker exec antmedia curl -f http://localhost:5443 # Örneğin HTTP endpoint test - + docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443 - name: Stop and remove container run: | docker stop antmedia