Skip to content

Commit

Permalink
Update install-dockerfile-and-check-ssl.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored Jul 1, 2024
1 parent bec0405 commit c325556
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/install-dockerfile-and-check-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
build:
runs-on: ubuntu-latest
runs-on: self-hosted

steps:
- name: Checkout repository
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit c325556

Please sign in to comment.