Update Gitea workflow for obfuscation: Added environment variables for Gitea host and repository path, modified git remote URL for pushing obfuscated builds, and ensured proper handling of commits with no changes. This enhances the deployment process for production assets.

This commit is contained in:
smueller
2026-05-28 17:11:57 +02:00
parent f4947d5e25
commit 219f1d2fcf

View File

@@ -6,6 +6,11 @@ on:
- main
workflow_dispatch:
env:
# Gitea liefert intern oft eine IP; das SSL-Zertifikat gilt für den Hostnamen.
GITEA_HOST: git.hexahost.dev
REPO_PATH: smueller/HexaHost-Frontend
jobs:
obfuscate:
runs-on: ubuntu-latest
@@ -15,6 +20,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
repository-url: https://git.hexahost.dev/smueller/HexaHost-Frontend
- name: Skip loop commits
run: |
@@ -39,13 +45,16 @@ jobs:
run: python scripts/obfuscate_release.py --root . --hash-assets
- name: Commit obfuscated build
env:
GITEA_TOKEN: ${{ github.token }}
run: |
git config user.name "gitea-actions"
git config user.email "actions@local"
git remote set-url origin "https://oauth2:${GITEA_TOKEN}@${GITEA_HOST}/${REPO_PATH}.git"
git add -A
if git diff --cached --quiet; then
echo "No build changes to commit."
exit 0
fi
git commit -m "chore(release): obfuscate and hash production assets [skip ci]"
git push
git push origin HEAD:main