name: "update docker image on swarm" description: "update docker image on swarm" inputs: docker: description: "DOCKER_HOST地址" required: true default: tcp://n1.coce.zone:2375 service: description: "SERVICE名称" required: true runs: using: "composite" steps: - uses: docker://docker:cli env: DOCKER_HOST: ${{ inputs.docker }} with: entrypoint: "/bin/sh" args: | -c 'docker login ${{vars.DOCKER_REGISTRY}} -u ${{vars.DOCKER_USER}} -p ${{vars.DOCKER_PASS}} && docker service update {{inputs.service}} -d --with-registry-auth --image ${{vars.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}'