Compare commits

..

15 commits

Author SHA1 Message Date
d75fad4473 Merge branch 'main' into renovate/ghcr.io-linuxserver-jellyfin
All checks were successful
Lint on PR / Lint YAML files (pull_request) Successful in 6s
Deploy to Hosts / deploy (pull_request) Successful in 4s
Deploy to Hosts / conditional-deploy (pull_request) Has been skipped
2024-07-23 22:29:42 -04:00
8d6fdbcc00 Update .forgejo/workflows/CD.yml 2024-07-23 21:58:14 -04:00
46c8a07804 Merge pull request '⬆️ Update ghcr.io/linuxserver/radarr Docker digest to 2a02b31' (#35) from renovate/ghcr.io-linuxserver-radarr into main
Reviewed-on: #35
2024-07-23 21:57:03 -04:00
6d0581c7ee Merge branch 'main' into renovate/ghcr.io-linuxserver-radarr
Some checks failed
Lint on PR / Lint YAML files (pull_request) Successful in 6s
Deploy to Hosts / deploy (pull_request) Successful in 5s
Deploy to Hosts / conditional-deploy (pull_request) Has been cancelled
2024-07-23 21:56:49 -04:00
9b9cdcdeb0 Update .forgejo/workflows/CD.yml 2024-07-23 21:56:17 -04:00
4311addb63 Merge pull request '⬆️ Update ghcr.io/linuxserver/bazarr Docker digest to 25f0d19' (#38) from renovate/ghcr.io-linuxserver-bazarr into main
Reviewed-on: #38
2024-07-23 21:48:47 -04:00
033bfead91 Merge branch 'main' into renovate/ghcr.io-linuxserver-bazarr
Some checks failed
Lint on PR / Lint YAML files (pull_request) Successful in 5s
Deploy to Hosts / deploy (pull_request) Has been cancelled
Deploy to Hosts / conditional-deploy (pull_request) Has been cancelled
2024-07-23 21:48:29 -04:00
11c2c2c82d Update .forgejo/workflows/CD.yml 2024-07-23 21:48:22 -04:00
31ae8971bf Update .forgejo/workflows/CD.yml 2024-07-23 21:47:12 -04:00
c3148d6604 Update .forgejo/workflows/CD.yml 2024-07-23 21:38:46 -04:00
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
1e3a2db19c ⬆️ Update ghcr.io/linuxserver/bazarr Docker digest to 25f0d19
All checks were successful
Lint on PR / Lint YAML files (pull_request) Successful in 10s
2024-07-23 22:01:05 +00:00
3f5b02ac6f ⬆️ Update ghcr.io/linuxserver/radarr Docker digest to 2a02b31
All checks were successful
Lint on PR / Lint YAML files (pull_request) Successful in 10s
2024-07-21 16:01:00 +00:00
3 changed files with 27 additions and 12 deletions

View file

@ -6,7 +6,7 @@ on:
jobs: jobs:
deploy: deploy:
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04 runs-on: docker
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -20,13 +20,32 @@ 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 '^docker/' | cut -d/ -f2 | sort | uniq)
echo "Modified folders: $folders" echo "Modified folders: $folders"
echo "::set-output name=folders::$folders" echo "::set-output name=folders::$folders"
- name: Set condition for deployment
id: set-condition
run: |
if [ -z "${{ steps.detect-changes.outputs.folders }}" ]; then
echo "No relevant changes detected."
echo "::set-output name=continue::false"
else
echo "Relevant changes detected."
echo "::set-output name=continue::true"
fi
conditional-deploy:
if: needs.deploy.outputs.continue == 'true'
runs-on: docker
needs: deploy
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy to hosts - name: Deploy to hosts
run: | run: |
IFS=' ' read -r -a folder_array <<< "${{ steps.detect-changes.outputs.folders }}" IFS=' ' read -r -a folder_array <<< "${{ needs.deploy.outputs.folders }}"
for folder in "${folder_array[@]}"; do for folder in "${folder_array[@]}"; do
case $folder in case $folder in
arrs) arrs)
@ -83,8 +102,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

View file

@ -1,7 +1,7 @@
--- ---
services: services:
bazarr: bazarr:
image: ghcr.io/linuxserver/bazarr@sha256:5da74fc1bbd5da69e3b4f9b2376f6ccfbe3b47f143e6eb5651ed37cc1d4412dd image: ghcr.io/linuxserver/bazarr@sha256:25f0d19ba9226fdf15aec0fc7fa134ba89fc6f77f09d7bd45b33c5960c47821e
container_name: bazarr container_name: bazarr
ports: ports:
- "6767:6767" - "6767:6767"
@ -43,7 +43,7 @@ services:
- PGID=1000 - PGID=1000
radarr: radarr:
image: ghcr.io/linuxserver/radarr@sha256:1eaf9e83fca2b9170d4f49f6c0e55ba38693718e7815743a9ec297d199ab1e73 image: ghcr.io/linuxserver/radarr@sha256:2a02b311cefb344cd0caf74a443b9d6318daf15bda5280a3bc732381db983dc3
container_name: radarr container_name: radarr
ports: ports:
- "7878:7878" - "7878:7878"