Add all files
Build APK file / Verify environment (push) Successful in 4s
Build APK file / Build APK file (push) Failing after 1m32s

This commit is contained in:
2026-08-19 20:28:56 +07:00
parent e94c3f5c61
commit f2ba761cc1
2 changed files with 117 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Sync Source to Host
run-name: ${{ gitea.actor }} is synchronizing the source code to the host
on:
push:
branches:
- main
- develop
jobs:
sync-source:
runs-on: ubuntu-latest
steps:
- name: Sync repository
run: |
REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
REPO_NAME=$(basename "${GITHUB_REPOSITORY}")
TARGET_DIR="/data/${REPO_NAME}"
BRANCH="${GITHUB_REF_NAME}"
if [ ! -d "$TARGET_DIR/.git" ]; then
echo "Cloning repository..."
git clone -b "$BRANCH" "$REPO_URL" "$TARGET_DIR"
else
echo "Updating repository..."
git -C "$TARGET_DIR" fetch origin "$BRANCH"
git -C "$TARGET_DIR" checkout "$BRANCH"
git -C "$TARGET_DIR" reset --hard "origin/$BRANCH"
fi
echo "Current commit:"
git -C "$TARGET_DIR" log --oneline -1