Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b4288fe86 | ||
|
|
9539e3d740 | ||
|
|
10ce58fdfe | ||
|
|
aeed804460 | ||
|
|
e21610880b | ||
|
|
13bebba16e |
No files matched your search
@@ -23,7 +23,17 @@
|
|||||||
"Bash(xargs git *)",
|
"Bash(xargs git *)",
|
||||||
"Bash(awk '{print $2}')",
|
"Bash(awk '{print $2}')",
|
||||||
"Bash(git tag *)",
|
"Bash(git tag *)",
|
||||||
"Bash(git push *)"
|
"Bash(git push *)",
|
||||||
|
"Bash(xargs grep *)",
|
||||||
|
"Read(//c/Users/laure/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.7/skills/brainstorming/**)",
|
||||||
|
"Read(//c/Users/laure/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.7/**)",
|
||||||
|
"Read(//c/Users/laure/.claude/plugins/cache/claude-plugins-official/superpowers/**)",
|
||||||
|
"Bash(bash \"C:/Users/laure/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.7/skills/brainstorming/scripts/start-server.sh\" --project-dir \"c:/Users/laure/Documents/Gitea/brainwave\")",
|
||||||
|
"Bash(git -C \"c:/Users/laure/Documents/Gitea/brainwave\" status --short)",
|
||||||
|
"Bash(git -C \"c:/Users/laure/Documents/Gitea/brainwave\" diff .gitea/workflows/deploy.yml)",
|
||||||
|
"Bash(git -C \"c:/Users/laure/Documents/Gitea/brainwave\" diff HEAD -- .gitea/workflows/deploy.yml)",
|
||||||
|
"Bash(git -C \"c:/Users/laure/Documents/Gitea/brainwave\" log --oneline -3 -- .gitea/workflows/deploy.yml)",
|
||||||
|
"Bash(git -C \"c:/Users/laure/Documents/Gitea/brainwave\" log --oneline origin/main..HEAD)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,16 +18,19 @@ jobs:
|
|||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: pip3 install --quiet --break-system-packages "ansible>=9,<11"
|
run: pip3 install --quiet --break-system-packages "ansible>=9,<11"
|
||||||
|
|
||||||
- name: Write SSH Key
|
- name: Setup SSH Agent
|
||||||
run: |
|
run: |
|
||||||
printf '%s\n' "${{ secrets.ANSIBLE_SSH_KEY }}" > /tmp/ansible_key
|
eval "$(ssh-agent -s)"
|
||||||
chmod 600 /tmp/ansible_key
|
printf '%s' "${{ secrets.ANSIBLE_SSH_KEY }}" | tr -d '\r\n' | base64 -d | ssh-add -
|
||||||
|
ssh-add -l
|
||||||
|
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV"
|
||||||
|
echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Write Inventory
|
- name: Write Inventory
|
||||||
# StrictHostKeyChecking=no is intentional for a known home-network host.
|
# StrictHostKeyChecking=no is intentional for a known home-network host.
|
||||||
# To harden, add the host fingerprint as a secret and use a known_hosts file.
|
# To harden, add the host fingerprint as a secret and use a known_hosts file.
|
||||||
run: |
|
run: |
|
||||||
printf '[orangepi]\norangepi ansible_host=%s ansible_user=%s ansible_ssh_private_key_file=/tmp/ansible_key ansible_ssh_common_args="-o StrictHostKeyChecking=no"\n' \
|
printf '[orangepi]\norangepi ansible_host=%s ansible_user=%s ansible_ssh_common_args="-o StrictHostKeyChecking=no -o ForwardAgent=yes"\n' \
|
||||||
"${{ secrets.ANSIBLE_HOST }}" \
|
"${{ secrets.ANSIBLE_HOST }}" \
|
||||||
"${{ secrets.ANSIBLE_USER }}" > /tmp/inventory.ini
|
"${{ secrets.ANSIBLE_USER }}" > /tmp/inventory.ini
|
||||||
|
|
||||||
@@ -54,8 +57,8 @@ jobs:
|
|||||||
-i /tmp/inventory.ini \
|
-i /tmp/inventory.ini \
|
||||||
-e "artifact_path=${WORKSPACE}"
|
-e "artifact_path=${WORKSPACE}"
|
||||||
|
|
||||||
- name: Cleanup Secrets
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
rm -f /tmp/ansible_key
|
ssh-agent -k || true
|
||||||
rm -f /tmp/inventory.ini
|
rm -f /tmp/inventory.ini
|
||||||
@@ -3,7 +3,7 @@ name: Release Pipeline
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: "20"
|
||||||
|
|
||||||
- name: Install Frontend Dependencies
|
- name: Install Frontend Dependencies
|
||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
@@ -83,11 +83,42 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: m0606/gitea-release-action@v3
|
env:
|
||||||
with:
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
SERVER_URL: ${{ github.server_url }}
|
||||||
files: |
|
REPOSITORY: ${{ github.repository }}
|
||||||
brainwave-amd64.tar.gz
|
TAG: ${{ github.ref_name }}
|
||||||
brainwave-arm64.tar.gz
|
run: |
|
||||||
docker-compose.amd64.yml
|
# 1. Create the release
|
||||||
docker-compose.arm64.yml
|
echo "Creating release for tag: ${TAG}"
|
||||||
|
RELEASE_RESPONSE=$(curl -s -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"${TAG}\", \"name\":\"Release ${TAG}\", \"body\":\"Automated release for version ${TAG}\", \"draft\":false, \"prerelease\":false}" \
|
||||||
|
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases")
|
||||||
|
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_RESPONSE" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('id', data.get('message', 'ERROR')))")
|
||||||
|
|
||||||
|
if [ "$RELEASE_ID" = "ERROR" ] || [ "$RELEASE_ID" = "release already exists for this tag" ]; then
|
||||||
|
echo "Release might already exist, attempting to find it..."
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases" \
|
||||||
|
| python3 -c "import sys, json; releases=json.load(sys.stdin); print(next((r['id'] for r in releases if r['tag_name'] == '${TAG}'), 'ERROR'))")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RELEASE_ID" = "ERROR" ]; then
|
||||||
|
echo "Failed to create or find release: $RELEASE_RESPONSE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Uploading assets to release ID: ${RELEASE_ID}"
|
||||||
|
for FILE in brainwave-amd64.tar.gz brainwave-arm64.tar.gz docker-compose.amd64.yml docker-compose.arm64.yml; do
|
||||||
|
echo "Uploading ${FILE}..."
|
||||||
|
UPLOAD_RESPONSE=$(curl -s -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-F "attachment=@${FILE}" \
|
||||||
|
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILE}")
|
||||||
|
echo "${UPLOAD_RESPONSE}" | python3 -c "import sys, json; data=json.load(sys.stdin); exit(0 if 'id' in data else 1)" \
|
||||||
|
|| { echo "Failed to upload ${FILE}"; echo "Response: ${UPLOAD_RESPONSE}"; exit 1; }
|
||||||
|
done
|
||||||
|
echo "Release completed successfully!"
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
backend/brainwave.db-shm
|
backend/brainwave.db-shm
|
||||||
backend/brainwave.db-wal
|
backend/brainwave.db-wal
|
||||||
.claude/settings.local.json
|
.claude/settings.local.json
|
||||||
|
.superpowers/
|
||||||
@@ -39,7 +39,7 @@ const frontendDistPath = path.join(__dirname, '../../frontend/dist')
|
|||||||
if (fs.existsSync(frontendDistPath)) {
|
if (fs.existsSync(frontendDistPath)) {
|
||||||
console.log(`Serving frontend from: ${frontendDistPath}`)
|
console.log(`Serving frontend from: ${frontendDistPath}`)
|
||||||
app.use(express.static(frontendDistPath))
|
app.use(express.static(frontendDistPath))
|
||||||
app.get('*', (req, res) => {
|
app.get('*path', (req, res) => {
|
||||||
if (!req.path.startsWith('/api')) {
|
if (!req.path.startsWith('/api')) {
|
||||||
res.sendFile(path.join(frontendDistPath, 'index.html'))
|
res.sendFile(path.join(frontendDistPath, 'index.html'))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user