Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23ba5c2e35 |
@@ -1,37 +0,0 @@
|
|||||||
name: Publish Helm Chart
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'chart/**'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
|
|
||||||
- name: Log in to GHCR
|
|
||||||
run: |
|
|
||||||
helm registry login ghcr.io \
|
|
||||||
--username ${{ github.actor }} \
|
|
||||||
--password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Package chart
|
|
||||||
run: helm package chart/
|
|
||||||
|
|
||||||
- name: Push chart to GHCR
|
|
||||||
run: |
|
|
||||||
CHART_VERSION=$(helm show chart chart/ | grep '^version:' | awk '{print $2}')
|
|
||||||
helm push antigravity-${CHART_VERSION}.tgz oci://ghcr.io/cpfarhood/charts
|
|
||||||
+7
-13
@@ -55,23 +55,17 @@ RUN_UID="${USER_ID:-1000}"
|
|||||||
RUN_GID="${GROUP_ID:-1000}"
|
RUN_GID="${GROUP_ID:-1000}"
|
||||||
chown -R "$RUN_UID:$RUN_GID" "$WORKSPACE_DIR"
|
chown -R "$RUN_UID:$RUN_GID" "$WORKSPACE_DIR"
|
||||||
|
|
||||||
# Start Happy Coder in background as the app user
|
# Ensure home directory exists on the PVC (may be absent on a fresh volume)
|
||||||
|
mkdir -p "$HOME"
|
||||||
|
chown "$RUN_UID:$RUN_GID" "$HOME"
|
||||||
|
|
||||||
|
# Start Happy Coder daemon
|
||||||
echo "Starting Happy Coder..."
|
echo "Starting Happy Coder..."
|
||||||
cd "$WORKSPACE_DIR"
|
cd "$WORKSPACE_DIR"
|
||||||
|
|
||||||
# Create Happy Coder log file
|
happy daemon start
|
||||||
HAPPY_LOG="/tmp/happy-coder.log"
|
|
||||||
touch "$HAPPY_LOG"
|
|
||||||
chown "$RUN_UID:$RUN_GID" "$HAPPY_LOG"
|
|
||||||
|
|
||||||
# Start Happy Coder (already running as the correct user via baseimage-gui)
|
echo "Happy Coder daemon started"
|
||||||
bash -c "cd '$WORKSPACE_DIR' && happy-coder > '$HAPPY_LOG' 2>&1 &"
|
|
||||||
|
|
||||||
# Save PID for monitoring
|
|
||||||
echo $! > /tmp/happy-coder.pid
|
|
||||||
|
|
||||||
echo "Happy Coder started (PID: $(cat /tmp/happy-coder.pid))"
|
|
||||||
echo "Logs available at: $HAPPY_LOG"
|
|
||||||
|
|
||||||
# Export workspace directory for startapp.sh
|
# Export workspace directory for startapp.sh
|
||||||
echo "$WORKSPACE_DIR" > /tmp/workspace-dir
|
echo "$WORKSPACE_DIR" > /tmp/workspace-dir
|
||||||
|
|||||||
Reference in New Issue
Block a user