Skip to content

Commit

Permalink
only print success deployment message after seeding is done
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Sep 13, 2024
1 parent fd6e21c commit 2c33c05
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/trigger-e2e-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,17 @@ jobs:
const repo = 'e2e';
const runId = ${{ steps.dispatch_e2e.outputs.runId }};
const prNumber = ${{ github.event.pull_request.number }};
const deployMessage = `Your environment is deployed to https://${{ env.BRANCH_NAME }}.opencrvs.dev.`;
function slugify(str) {
return str
.toLowerCase()
.replace(/[^\w\s-]/g, '')
.trim()
.replace(/\s+/g, '-')
.replace(/-+/g, '-');
}
const branchName = slugify('${{ env.BRANCH_NAME }}');
const deployMessage = `Your environment is deployed to https://${branchName}.opencrvs.dev.`;
let deployJobCompleted = false;
Expand All @@ -126,7 +136,7 @@ jobs:
run_id: runId
});
const deployJob = jobs.data.jobs.find(job => job.name === 'deploy / deploy');
const deployJob = jobs.data.jobs.find(job => job.name === 'deploy / seed-data / seed-data');
if (deployJob && deployJob.status === 'completed') {
deployJobCompleted = true;
Expand Down

0 comments on commit 2c33c05

Please sign in to comment.