name: Deploy Addon on: push: branches: master paths: - 'addon/**' - '.github/**' jobs: build-and-deploy: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/build-push-action@v6 with: context: ./addon push: true tags: | ghcr.io/thebeastlt/torrentio-addon:${{ github.sha }} ghcr.io/thebeastlt/torrentio-addon:latest - name: Rolling update on the swarm uses: appleboy/ssh-action@master with: host: ${{ secrets.SSH_HOST_1 }} key: ${{ secrets.SSH_KEY_1 }} username: ${{ secrets.SSH_USERNAME }} port: ${{ secrets.SSH_PORT }} script: | docker service update --with-registry-auth \ --image ghcr.io/thebeastlt/torrentio-addon:${{ github.sha }} \ torrentio_addon