@@ -36,48 +36,8 @@ permissions:
3636 attestations : write # Required for signing and attestation (if needed)
3737
3838jobs :
39- check-weblate :
40- runs-on : ubuntu-latest
41- outputs :
42- should-skip : ${{ steps.check.outputs.should-skip }}
43- steps :
44- - name : Checkout repository
45- uses : actions/checkout@v4
46- with :
47- fetch-depth : 0
48-
49- - name : Check if only weblate changes
50- id : check
51- run : |
52- # Get the list of changed files in the push
53- if [ "${{ github.event_name }}" = "push" ]; then
54- # For push events, check files changed since the previous commit
55- CHANGED_FILES=$(git diff --name-only ${{ github.event.before }}..${{ github.event.after }})
56- else
57- # For other events, don't skip
58- echo "should-skip=false" >> $GITHUB_OUTPUT
59- exit 0
60- fi
61-
62- echo "Changed files:"
63- echo "$CHANGED_FILES"
64-
65- # Check if all changed files are only translation files
66- NON_TRANSLATION_FILES=$(echo "$CHANGED_FILES" | grep -v '^frontend/locales/' || true)
67-
68- # Check if the actor is weblate OR if only translation files were changed
69- if [ "${{ github.actor }}" = "weblate" ] || [ -z "$NON_TRANSLATION_FILES" ]; then
70- echo "should-skip=true" >> $GITHUB_OUTPUT
71- echo "Skipping build: weblate user or only translation files changed"
72- else
73- echo "should-skip=false" >> $GITHUB_OUTPUT
74- echo "Proceeding with build: non-translation changes detected"
75- fi
76-
7739 build :
7840 runs-on : ubuntu-latest
79- needs : check-weblate
80- if : needs.check-weblate.outputs.should-skip != 'true'
8141 permissions :
8242 contents : read # Allows access to repository contents (read-only)
8343 packages : write # Allows pushing to GHCR
@@ -172,15 +132,14 @@ jobs:
172132 retention-days : 1
173133
174134 merge :
175- if : github.event_name != 'pull_request' && needs.check-weblate.outputs.should-skip != 'true'
135+ if : github.event_name != 'pull_request'
176136 runs-on : ubuntu-latest
177137 permissions :
178138 contents : read # Allows access to repository contents (read-only)
179139 packages : write # Allows pushing to GHCR
180140 id-token : write # Allows identity token write access for authentication
181141 attestations : write # Needed for signing and attestation (if required)
182142 needs :
183- - check-weblate
184143 - build
185144
186145 steps :
0 commit comments