Commit 0fbb4f9
Fix AWX job status validation to check actual job result
The previous fix in PR #402 was checking steps.awx_job.outcome, which only
validates that the fitbeard/action-trigger-awx action itself ran successfully.
However, the action always exits with success even when the AWX job fails,
because it only exits non-zero during its own validation steps, not based on
the Ansible playbook execution result.
This fix now:
1. Checks if the action step itself succeeded (steps.awx_job.outcome)
2. Retrieves the job_id output from the action
3. Queries the AWX API directly to check the actual job status
4. Fails the workflow if the job status is "failed" or if the failed flag is true
5. Fails if the status is anything other than "successful"
This ensures that AWX/Ansible failures (SOPS errors, unreachable hosts, task
failures, etc.) properly fail the GitHub Actions workflow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 6590200 commit 0fbb4f9
1 file changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments