Skip to content

Commit

Permalink
Fail the job if he deploy fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwi committed Aug 8, 2024
1 parent 0edd15a commit 1c27da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/swarm-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -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

0 comments on commit 1c27da7

Please sign in to comment.