Skip to content

Commit

Permalink
update format and only get recent logs
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Aug 3, 2023
1 parent 102f911 commit f77dbe1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ jobs:
role-session-name: GithubDeploy
aws-region: ${{ env.AWS_REGION }}

- name: Set Version Label
run: echo "version_label=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Set Vars
run: |
echo "version_label=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
echo "deploy_start=$(date --iso-8601=second)" >> $GITHUB_ENV
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v21
Expand All @@ -50,4 +52,6 @@ jobs:
wait_for_environment_recovery: 120

- name: Tail logs
run: aws logs --region ${{ env.AWS_REGION }} tail /aws/elasticbeanstalk/Commcare-connect-env/var/log/cfn-init-cmd.log
run: |
aws logs --region ${{ env.AWS_REGION }} tail --format short --since ${{ env.deploy_start }} \
/aws/elasticbeanstalk/Commcare-connect-env/var/log/cfn-init-cmd.log

0 comments on commit f77dbe1

Please sign in to comment.