Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI for production #321

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,22 @@ jobs:
echo "War file not found."
exit 1
fi

- name: Tag Docker image
run: |
docker pull antmedia/snapshot:latest
docker tag antmedia/snapshot:latest antmedia/snapshot:latest-main
docker push antmedia/snapshot:latest-main

- name: Install kubectl
uses: azure/setup-kubectl@v3

- name: Configure kubectl and restart the deployment
run: |
echo "${{ secrets.KUBE_CONFIG_DATA }}" > kubeconfig
export KUBECONFIG=./kubeconfig
kubectl rollout restart deployment ant-media-server-origin -n antmedia

- name: Login to server
run: |
response=$(curl -X POST -H "Accept: Application/json" -H "Content-Type: application/json" ${{ secrets.STAGING_SERVER_URL }}/rest/v2/users/authenticate -d '{"email":"${{ secrets.USER_NAME }}","password":"${{ secrets.PASSWORD }}"}' -c cookie.txt)
Expand Down
Loading