All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 39s
38 lines
898 B
YAML
38 lines
898 B
YAML
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:
|
|
nomad:
|
|
runs-on: ubuntu-latest
|
|
name: Deploy to Nomad
|
|
|
|
steps:
|
|
# 1. Checkout Code
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
# 2. Install Nomad CLI
|
|
- name: Setup Nomad CLI
|
|
uses: hashicorp/setup-nomad@main
|
|
with:
|
|
version: '1.10.0' # Use your desired version or remove for 'latest'
|
|
|
|
# 3. Deploy the Nomad Job
|
|
- name: Deploy Nomad Job
|
|
id: deploy
|
|
env:
|
|
# REQUIRED: Set the Nomad server address
|
|
NOMAD_ADDR: http://nomad.service.dc1.consul:4646
|
|
|
|
run: |
|
|
nomad status
|
|
nomad job run fitbit-garmin-sync.nomad
|