File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 20
20
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
21
21
git fetch --unshallow
22
22
fi
23
- folders=$(git diff --name-only HEAD~1 HEAD | cut -d/ -f1 | sort | uniq)
23
+ folders=$(git diff --name-only HEAD~1 HEAD | grep '^iac/docker/' | cut -d/ -f3 | sort | uniq)
24
24
echo "Modified folders: $folders"
25
25
echo "::set-output name=folders::$folders"
26
26
83
83
-d "{\"extra_vars\": {\"target_host\": \"$target_host\", \"folder\": \"$folder\"}}" \
84
84
"https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/"
85
85
86
- sleep 45 # Delay for 45 seconds before fetching logs
87
-
86
+ sleep 45
87
+
88
88
job_id=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/job_templates/13/jobs/?order_by=-id | jq -r '.results[0].id')
89
89
logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json)
90
90
echo "AWX Job Logs for folder: $folder"
You can’t perform that action at this time.
0 commit comments