Skip to content

Commit 6d0581c

Browse files
author
Matt Reeves
committedJul 24, 2024
Merge branch 'main' into renovate/ghcr.io-linuxserver-radarr
2 parents 3f5b02a + 9b9cdcd commit 6d0581c

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed
 

‎.forgejo/workflows/CD.yml

+24-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
deploy:
88
if: github.event.pull_request.merged == true
9-
runs-on: ubuntu-22.04
9+
runs-on: docker
1010
steps:
1111
- name: Checkout repository
1212
uses: actions/checkout@v4
@@ -20,13 +20,32 @@ 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 '^docker/' | cut -d/ -f2 | sort | uniq)
2424
echo "Modified folders: $folders"
2525
echo "::set-output name=folders::$folders"
2626
27+
- name: Set condition for deployment
28+
id: set-condition
29+
run: |
30+
if [ -z "${{ steps.detect-changes.outputs.folders }}" ]; then
31+
echo "No relevant changes detected."
32+
echo "::set-output name=continue::false"
33+
else
34+
echo "Relevant changes detected."
35+
echo "::set-output name=continue::true"
36+
fi
37+
38+
conditional-deploy:
39+
if: needs.deploy.outputs.continue == 'true'
40+
runs-on: ubuntu-22.04
41+
needs: deploy
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
2746
- name: Deploy to hosts
2847
run: |
29-
IFS=' ' read -r -a folder_array <<< "${{ steps.detect-changes.outputs.folders }}"
48+
IFS=' ' read -r -a folder_array <<< "${{ needs.deploy.outputs.folders }}"
3049
for folder in "${folder_array[@]}"; do
3150
case $folder in
3251
arrs)
@@ -83,8 +102,8 @@ jobs:
83102
-d "{\"extra_vars\": {\"target_host\": \"$target_host\", \"folder\": \"$folder\"}}" \
84103
"https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/"
85104
86-
sleep 45 # Delay for 45 seconds before fetching logs
87-
105+
sleep 45
106+
88107
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')
89108
logs=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/?format=json)
90109
echo "AWX Job Logs for folder: $folder"

‎.forgejo/workflows/yamllint.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@ jobs:
1717
with:
1818
node-version: 14
1919

20-
- name: Install yamllint
21-
run: |
22-
npm install -g yaml-lint
23-
2420
- name: Show yamllint version
2521
run: |
2622
yamllint --version
2723
2824
- name: Lint .yml files
2925
run: |
30-
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./**/*.yml
26+
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" docker/**/*.yml

‎docker/arrs/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
services:
33
bazarr:
4-
image: ghcr.io/linuxserver/bazarr@sha256:5da74fc1bbd5da69e3b4f9b2376f6ccfbe3b47f143e6eb5651ed37cc1d4412dd
4+
image: ghcr.io/linuxserver/bazarr@sha256:25f0d19ba9226fdf15aec0fc7fa134ba89fc6f77f09d7bd45b33c5960c47821e
55
container_name: bazarr
66
ports:
77
- "6767:6767"

0 commit comments

Comments
 (0)
Please sign in to comment.