Skip to content

Commit e19c132

Browse files
author
mafyuh
committedJul 24, 2024
Update .forgejo/workflows/CD.yml
1 parent 4760a17 commit e19c132

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎.forgejo/workflows/CD.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
2121
git fetch --unshallow
2222
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)
2424
echo "Modified folders: $folders"
2525
echo "::set-output name=folders::$folders"
2626
@@ -83,8 +83,8 @@ jobs:
8383
-d "{\"extra_vars\": {\"target_host\": \"$target_host\", \"folder\": \"$folder\"}}" \
8484
"https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/"
8585
86-
sleep 45 # Delay for 45 seconds before fetching logs
87-
86+
sleep 45
87+
8888
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')
8989
logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json)
9090
echo "AWX Job Logs for folder: $folder"

0 commit comments

Comments
 (0)
Please sign in to comment.