Update .forgejo/workflows/CD.yml

This commit is contained in:
Matt Reeves 2024-06-10 02:17:52 +00:00
parent eb20a58bbc
commit 435cc79fba

View file

@ -67,7 +67,10 @@ jobs:
- name: Fetch AWX Job Logs - name: Fetch AWX Job Logs
run: | run: |
# Fetch the most recent job from AWX # 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 # 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"