Skip to content

Commit

Permalink
Merge pull request #274 from ant-media/check_marketplace_jwt_token
Browse files Browse the repository at this point in the history
Add test for marketplace product check with jwt token
  • Loading branch information
mekya authored Mar 6, 2024
2 parents a5b9f88 + 7348061 commit 25c7b51
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check-marketplace-jwt-token.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Marketplace SSL Test

#run tests on schedule because we don't want to generate a subdomain everytime
on:
schedule:
- cron: '0 0 * * 1'

jobs:
run_build:
name: Marketplace SSL Test
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Run enable_ssl.sh for marketplace
uses: appleboy/ssh-action@master
with:
#OVH_REMOTE_HOST has marketplace version deployed
host: ${{ secrets.OVH_REMOTE_HOST }}
username: ${{ secrets.OVH_REMOTE_USERNAME }}
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }}
port: ${{ secrets.OVH_REMOTE_PORT }}
# If the version is not marketplace, following enable_ssl.sh script fails
script: |
SECRET_KEY=$(openssl rand -base64 32 | head -c 32)
sudo sed -i "/^server.jwtServerControlEnabled=/s|.*|server.jwtServerControlEnabled=true|" /usr/local/antmedia/conf/red5.properties
sudo sed -i "/^server.jwtServerSecretKey=/s|.*|server.jwtServerSecretKey=$SECRET_KEY|" /usr/local/antmedia/conf/red5.properties
sudo service antmedia restart
sudo bash /usr/local/antmedia/enable_ssl.sh
- name: Run enable_ssl.sh for existing domain
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.OVH_REMOTE_HOST }}
username: ${{ secrets.OVH_REMOTE_USERNAME }}
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }}
port: ${{ secrets.OVH_REMOTE_PORT }}
#restore the old domain to not encounter any issue
script: |
sudo bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.OVH_REMOTE_HOST }}

0 comments on commit 25c7b51

Please sign in to comment.