name: Deploy to Nomad on: workflow_run: workflows: ["Build and Push Docker Image"] # Must match your build workflow name exactly types: - completed workflow_dispatch: # Allows manual triggering for testing jobs: deploy: runs-on: ubuntu-latest # Run if manually triggered OR if the build workflow succeeded if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout code uses: actions/checkout@v3 - name: Deploy with Nomad uses: qazz92/nomad-deploy@v1 with: address: http://nomad.service.dc1.consul:4646 job: fitbit-garmin-sync.nomad