From 451de1ab49207272943a57c0061ddcc516af66d4 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 7 Aug 2024 20:33:34 -0700 Subject: [PATCH] Fail the job if he deploy fails --- .github/actions/swarm-deploy/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/swarm-deploy/action.yml b/.github/actions/swarm-deploy/action.yml index f2b8ac47..96d2d7fb 100644 --- a/.github/actions/swarm-deploy/action.yml +++ b/.github/actions/swarm-deploy/action.yml @@ -40,7 +40,7 @@ runs: jq '.Spec.TaskTemplate.ContainerSpec.Image="${{ inputs.IMAGE_TAG}}" | .Spec' service.spec.json > update.spec.json - curl -s -X POST -H "X-API-Key: ${{env.PORTAINER_API_KEY}}" -H "Content-Type: application/json" ${{inputs.PORTAINER_DOMAIN_PROTOCOL}}://${{inputs.PORTAINER_DOMAIN}}/api/endpoints/${{env.ENDPOINT_ID}}/docker/services/${{ inputs.STACK_NAME }}/update?version=$version -d @update.spec.json + curl -v -f -s -X POST -H "X-API-Key: ${{env.PORTAINER_API_KEY}}" -H "Content-Type: application/json" ${{inputs.PORTAINER_DOMAIN_PROTOCOL}}://${{inputs.PORTAINER_DOMAIN}}/api/endpoints/${{env.ENDPOINT_ID}}/docker/services/${{ inputs.STACK_NAME }}/update?version=$version -d @update.spec.json echo PREVIOUS_IMAGE=$previousimg >> $GITHUB_OUTPUT echo DEPLOYED_DATE=$(date -u) >> $GITHUB_OUTPUT