From 435cc79fba943505358b37144a30c3a5dc6eb82a Mon Sep 17 00:00:00 2001 From: mafyuh Date: Mon, 10 Jun 2024 02:17:52 +0000 Subject: [PATCH] Update .forgejo/workflows/CD.yml --- .forgejo/workflows/CD.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/CD.yml b/.forgejo/workflows/CD.yml index 330d33f..0868536 100644 --- a/.forgejo/workflows/CD.yml +++ b/.forgejo/workflows/CD.yml @@ -67,7 +67,10 @@ jobs: - name: Fetch AWX Job Logs run: | # Fetch the most recent job from AWX - 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') + 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') # Fetch the logs for the job - curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/ + logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json) + + # Display the logs + echo "$logs"