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:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**/CHANGES.md'
|
||||
- '**/build-info.json'
|
||||
paths:
|
||||
- '.gitea/workflows/*.yml'
|
||||
- '**/Dockerfile'
|
||||
- '**/*.sh'
|
||||
- '!.cache/*'
|
||||
- '!**/CHANGES.md'
|
||||
- '!**/build-info.json'
|
||||
schedule:
|
||||
- cron: '0 1 * * 0'
|
||||
|
||||
@@ -87,25 +91,26 @@ jobs:
|
||||
check_variant() {
|
||||
variant=$1
|
||||
new_digest=$2
|
||||
infofile="$variant/build-info.json"
|
||||
digest_file=".cache/${variant}-base.digest"
|
||||
last_digest=""
|
||||
base_changed=false
|
||||
code_changed=false
|
||||
|
||||
if [ -f "$infofile" ]; then
|
||||
last_digest=$(jq -r '.base_digest // empty' "$infofile")
|
||||
if [ -f "$digest_file" ]; then
|
||||
last_digest=$(cat "$digest_file")
|
||||
fi
|
||||
|
||||
if [ "$last_digest" != "$new_digest" ]; then
|
||||
base_changed=true
|
||||
echo "[INFO] $variant base image changed: $last_digest -> $new_digest"
|
||||
fi
|
||||
|
||||
# Detect changes in variant folder compared to origin/main
|
||||
code_changed=$(git diff --name-only origin/main | grep "^$variant/" || true)
|
||||
if [[ -n "$code_changed" ]]; then
|
||||
# Check if code in the variant directory changed
|
||||
git fetch origin main
|
||||
code_diff=$(git diff --name-only origin/main...HEAD | grep "^$variant/" || true)
|
||||
if [[ -n "$code_diff" ]]; then
|
||||
code_changed=true
|
||||
else
|
||||
code_changed=false
|
||||
echo "[INFO] $variant code changed: $code_diff"
|
||||
fi
|
||||
|
||||
should_build=false
|
||||
|
||||
Reference in New Issue
Block a user