mirror of
https://git.hexahost.dev/smueller/HexaHost-Frontend.git
synced 2026-06-02 08:08:43 +00:00
chore(release): obfuscate and hash production assets [skip ci]
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
name: Release Build (dev → main)
|
||||
name: Release Build (ci → main)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- ci
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@@ -16,29 +16,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout (volle History)
|
||||
- name: Checkout ci (Integration)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository-url: https://git.hexahost.dev/smueller/HexaHost-Frontend
|
||||
ref: dev
|
||||
|
||||
- name: Merge dev in CI-Workspace (Basis main)
|
||||
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 fetch origin main dev
|
||||
|
||||
if git show-ref --verify --quiet refs/remotes/origin/main; then
|
||||
git checkout -B main origin/main
|
||||
git merge origin/dev -X theirs --no-edit -m "ci: merge dev for release build"
|
||||
else
|
||||
echo "main branch missing, initializing from dev"
|
||||
git checkout -B main origin/dev
|
||||
fi
|
||||
ref: ci
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
@@ -60,10 +43,20 @@ jobs:
|
||||
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 fetch origin main ci
|
||||
|
||||
git add -A
|
||||
if git diff --cached --quiet; then
|
||||
echo "No release changes to publish."
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "chore(release): obfuscate and hash production assets [skip ci]"
|
||||
git push origin main
|
||||
|
||||
TREE=$(git write-tree)
|
||||
MSG="chore(release): obfuscate and hash production assets [skip ci]"
|
||||
if git show-ref --verify --quiet refs/remotes/origin/main; then
|
||||
PARENT=$(git rev-parse origin/main)
|
||||
COMMIT=$(git commit-tree "$TREE" -p "$PARENT" -m "$MSG")
|
||||
else
|
||||
COMMIT=$(git commit-tree "$TREE" -m "$MSG")
|
||||
fi
|
||||
git push origin "${COMMIT}:refs/heads/main"
|
||||
|
||||
Reference in New Issue
Block a user