forked from chatwoot/chatwoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from DigitalTolk/master-staging
feat: bump version to 3.7.0
- Loading branch information
Showing
1,055 changed files
with
17,656 additions
and
5,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## github action to check deployment success | ||
## curl the deployment url and check for 200 status | ||
## deployment url will be of the form chatwoot-pr-<pr_number>.herokuapp.com | ||
name: Deploy Check | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
deployment_check: | ||
name: Check Deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install jq | ||
run: sudo apt-get install -y jq | ||
- name: Print Deployment URL | ||
run: echo "https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com" | ||
- name: Check Deployment Status | ||
run: | | ||
max_attempts=10 | ||
attempt=1 | ||
status_code=0 | ||
echo "Waiting for review app to be deployed/redeployed, trying in 10 minutes..." | ||
sleep 600 | ||
while [ $attempt -le $max_attempts ]; do | ||
response=$(curl -s -o /dev/null -w "%{http_code}" https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com/api) | ||
status_code=$(echo $response | head -n 1) | ||
if [ $status_code -eq 200 ]; then | ||
body=$(curl -s https://chatwoot-pr-${{ github.event.pull_request.number }}.herokuapp.com/api) | ||
if echo "$body" | jq -e '.version and .timestamp and .queue_services == "ok" and .data_services == "ok"' > /dev/null; then | ||
echo "Deployment successful" | ||
exit 0 | ||
else | ||
echo "Deployment status unknown, retrying in 3 minutes..." | ||
sleep 180 | ||
fi | ||
else | ||
echo "Waiting for review app to be ready, retrying in 3 minutes..." | ||
sleep 180 | ||
attempt=$((attempt + 1)) | ||
fi | ||
done | ||
echo "Deployment failed after $max_attempts attempts" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.