Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
yossi-eynav committed Dec 15, 2023
1 parent 0aefec2 commit 096a224
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ jobs:
SERVER_EMAIL_SMTP_AUTH_TEMPLATE_PASS=${{ secrets.SERVER_EMAIL_SMTP_AUTH_TEMPLATE_PASS }}
SERVER_EMAIL_DIGEST_PLANS=${{ secrets.SERVER_EMAIL_DIGEST_PLANS }}
SERVER_PROXY_API_KEY=${{ secrets.SERVER_PROXY_API_KEY }}
VERSION=${{github.sha}}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a
with:
Expand Down Expand Up @@ -188,6 +189,7 @@ jobs:
SERVER_EMAIL_SMTP_AUTH_TEMPLATE_PASS=${{ secrets.SERVER_EMAIL_SMTP_AUTH_TEMPLATE_PASS }}
SERVER_EMAIL_DIGEST_PLANS=${{ secrets.SERVER_EMAIL_DIGEST_PLANS }}
SERVER_PROXY_API_KEY=${{ secrets.SERVER_PROXY_API_KEY }}
VERSION=${{github.sha}}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a
with:
Expand Down
7 changes: 7 additions & 0 deletions server/bin/serve
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ mainApp.use('/health', (req, res) => {
res.sendStatus(200);
})

mainApp.use('/version', (req, res) => {
res.send({
commit: process.env.VERSION,
url: `https://github.com/meirim-org/meirim/commit/${process.env.VERSION}`,
});
})

// mount api and static apps
mainApp.get('/test', (req, res) => { res.sendStatus(200) } )
mainApp.use('/api', apiApp);
Expand Down

0 comments on commit 096a224

Please sign in to comment.