Skip to content

Commit

Permalink
Remove unnecessary checkout step and add error handling for Docker co…
Browse files Browse the repository at this point in the history
…mmands in CD workflow
  • Loading branch information
tsviz committed Sep 28, 2024
1 parent 3c4ff6c commit fa57577
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ jobs:
url: http://tsvi.eastus.cloudapp.azure.com
needs: [staging-end2end-tests]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: 'Az CLI Login via OIDC'
uses: azure/[email protected]
with:
Expand All @@ -84,6 +81,6 @@ jobs:
export ASPNETCORE_URLS='${{ secrets.ASPNETCORE_URLS }}'
export TAG='${{ inputs.image_tag }}'
cd /home/azureuser
docker compose pull webapp
docker compose up -d --no-deps --build webapp
docker compose pull webapp || { echo 'Failed to pull the image' ; exit 1; }
docker compose up -d --no-deps --build webapp || { echo 'Failed to start the container' ; exit 1; }
"

0 comments on commit fa57577

Please sign in to comment.