Compare commits

..

3 commits

Author SHA1 Message Date
3dcaf9aff4 Merge branch 'main' into renovate/ghcr.io-linuxserver-bazarr
All checks were successful
Lint on PR / Lint YAML files (pull_request) Successful in 6s
2024-07-23 21:26:40 -04:00
0d60994a5b Update .forgejo/workflows/yamllint.yml 2024-07-23 21:26:33 -04:00
e19c132f30 Update .forgejo/workflows/CD.yml 2024-07-23 21:19:23 -04:00
2 changed files with 4 additions and 8 deletions

View file

@ -20,7 +20,7 @@ jobs:
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
git fetch --unshallow git fetch --unshallow
fi fi
folders=$(git diff --name-only HEAD~1 HEAD | cut -d/ -f1 | sort | uniq) folders=$(git diff --name-only HEAD~1 HEAD | grep '^iac/docker/' | cut -d/ -f3 | sort | uniq)
echo "Modified folders: $folders" echo "Modified folders: $folders"
echo "::set-output name=folders::$folders" echo "::set-output name=folders::$folders"
@ -83,8 +83,8 @@ jobs:
-d "{\"extra_vars\": {\"target_host\": \"$target_host\", \"folder\": \"$folder\"}}" \ -d "{\"extra_vars\": {\"target_host\": \"$target_host\", \"folder\": \"$folder\"}}" \
"https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/" "https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/"
sleep 45 # Delay for 45 seconds before fetching logs sleep 45
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')
logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json) logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json)
echo "AWX Job Logs for folder: $folder" echo "AWX Job Logs for folder: $folder"

View file

@ -17,14 +17,10 @@ jobs:
with: with:
node-version: 14 node-version: 14
- name: Install yamllint
run: |
npm install -g yaml-lint
- name: Show yamllint version - name: Show yamllint version
run: | run: |
yamllint --version yamllint --version
- name: Lint .yml files - name: Lint .yml files
run: | run: |
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./**/*.yml yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" docker/**/*.yml