File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 SUMMARY : ${{ steps.prompt.outputs.response }}
4949` ` `
5050
51- ### Troubleshoot Terraform Deployments
51+ ### Troubleshoot Terraform Infrastructure-as-Code
5252
5353` ` ` yml
5454on :
8686 uses : op5dev/prompt-ai@v2
8787 with :
8888 model : openai/gpt-4.1-mini
89- system-prompt : You are a helpful DevOps assistant and expert at debugging Terraform errors.
89+ system-prompt : You are a helpful DevOps assistant and expert at troubleshooting Terraform errors.
9090 user-prompt : Troubleshoot the following Terraform output; ${{ steps.provision.outputs.result }}
9191 max-tokens : 500
92+ ` ` `
93+
94+ ### Debug Nomad-Pack Deployment
95+
96+ ` ` ` yml
97+ on :
98+ pull_request :
99+ push :
100+ branches : main
101+
102+ jobs :
103+ deploy :
104+ runs-on : ubuntu-latest
105+
106+ permissions :
107+ contents : read
108+ models : read
109+
110+ steps :
111+ - name : Checkout repository
112+ uses : actions/checkout@v4
113+
114+ - name : Setup Nomad-Pack
115+ uses : hashicorp/setup-nomad-pack@main
116+
117+ - name : Run Nomad-Pack
118+ id : nomad
119+ run : |
120+ nomad-pack run . --verbose 2>&1 | tee log.txt
121+ status=${PIPESTATUS[0]}
122+ if [[ $status -ne 0 ]]; then
123+ echo "log<<EOH" >> "$GITHUB_OUTPUT"
124+ cat log.txt >> "$GITHUB_OUTPUT"
125+ echo "EOH" >> "$GITHUB_OUTPUT"
126+ fi
127+ exit $status
128+
129+ - name : Debug Nomad-Pack
130+ if : failure()
131+ uses : op5dev/prompt-ai@v2
132+ with :
133+ model : openai/gpt-4.1-mini
134+ system-prompt : You are a helpful DevOps assistant and expert at debugging Nomad-Pack deployments.
135+ user-prompt : Debug the following Nomad-Pack deployment log; ${{ steps.nomad.outputs.log }}
92136 temperature : 0.7
93137 top-p : 0.9
94138` ` `
You can’t perform that action at this time.
0 commit comments