test
All checks were successful
Build and Push Teamspeak Images on Base Image Update / check-for-changes (push) Successful in 6s
Build and Push Teamspeak Images on Base Image Update / build-alpine (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / build-debian (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / build-basic (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / generate-build-info (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / generate-changelogs (push) Has been skipped
All checks were successful
Build and Push Teamspeak Images on Base Image Update / check-for-changes (push) Successful in 6s
Build and Push Teamspeak Images on Base Image Update / build-alpine (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / build-debian (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / build-basic (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / generate-build-info (push) Has been skipped
Build and Push Teamspeak Images on Base Image Update / generate-changelogs (push) Has been skipped
This commit is contained in:
@@ -4,9 +4,13 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths-ignore:
|
paths:
|
||||||
- '**/CHANGES.md'
|
- '.gitea/workflows/*.yml'
|
||||||
- '**/build-info.json'
|
- '**/Dockerfile'
|
||||||
|
- '**/*.sh'
|
||||||
|
- '!.cache/*'
|
||||||
|
- '!**/CHANGES.md'
|
||||||
|
- '!**/build-info.json'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 1 * * 0'
|
- cron: '0 1 * * 0'
|
||||||
|
|
||||||
@@ -87,25 +91,26 @@ jobs:
|
|||||||
check_variant() {
|
check_variant() {
|
||||||
variant=$1
|
variant=$1
|
||||||
new_digest=$2
|
new_digest=$2
|
||||||
infofile="$variant/build-info.json"
|
digest_file=".cache/${variant}-base.digest"
|
||||||
last_digest=""
|
last_digest=""
|
||||||
base_changed=false
|
base_changed=false
|
||||||
code_changed=false
|
code_changed=false
|
||||||
|
|
||||||
if [ -f "$infofile" ]; then
|
if [ -f "$digest_file" ]; then
|
||||||
last_digest=$(jq -r '.base_digest // empty' "$infofile")
|
last_digest=$(cat "$digest_file")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$last_digest" != "$new_digest" ]; then
|
if [ "$last_digest" != "$new_digest" ]; then
|
||||||
base_changed=true
|
base_changed=true
|
||||||
|
echo "[INFO] $variant base image changed: $last_digest -> $new_digest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Detect changes in variant folder compared to origin/main
|
# Check if code in the variant directory changed
|
||||||
code_changed=$(git diff --name-only origin/main | grep "^$variant/" || true)
|
git fetch origin main
|
||||||
if [[ -n "$code_changed" ]]; then
|
code_diff=$(git diff --name-only origin/main...HEAD | grep "^$variant/" || true)
|
||||||
|
if [[ -n "$code_diff" ]]; then
|
||||||
code_changed=true
|
code_changed=true
|
||||||
else
|
echo "[INFO] $variant code changed: $code_diff"
|
||||||
code_changed=false
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
should_build=false
|
should_build=false
|
||||||
|
|||||||
Reference in New Issue
Block a user