diff --git a/.github/actions/swarm-deploy/action.yml b/.github/actions/swarm-deploy/action.yml index eff596ce..7b75375b 100644 --- a/.github/actions/swarm-deploy/action.yml +++ b/.github/actions/swarm-deploy/action.yml @@ -26,14 +26,14 @@ runs: id: deploy shell: bash run: | - curl -s -H "X-API-Key: ${{env.PORTAINER_API_KEY}}" https://${{inputs.PORTAINER_DOMAIN}}/api/endpoints/${{env.ENDPOINT_ID}}/docker/services/${{ inputs.STACK_NAME }} > service.spec.json + curl -s -H "X-API-Key: ${{env.PORTAINER_API_KEY}}" http://${{inputs.PORTAINER_DOMAIN}}/api/endpoints/${{env.ENDPOINT_ID}}/docker/services/${{ inputs.STACK_NAME }} > service.spec.json version=$(jq '.Version.Index' service.spec.json) previousimg=$(jq '.Spec.TaskTemplate.ContainerSpec.Image' -r service.spec.json) 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}}" https://${{inputs.PORTAINER_DOMAIN}}/api/endpoints/${{env.ENDPOINT_ID}}/docker/services/${{ inputs.STACK_NAME }}/update?version=$version -d @update.spec.json + curl -s -X POST -H "X-API-Key: ${{env.PORTAINER_API_KEY}}" http://${{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 \ No newline at end of file + echo DEPLOYED_DATE=$(date -u) >> $GITHUB_OUTPUT