chpore: add gitea stuff
This commit is contained in:
20
.gitea/workflows/ai-solve-issue.yml
Normal file
20
.gitea/workflows/ai-solve-issue.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# .gitea/workflows/ai-solve-issue.yml
|
||||||
|
name: AI Issue Solver
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
solve:
|
||||||
|
if: github.event.label.name == 'ai-solve'
|
||||||
|
runs-on: opencode
|
||||||
|
steps:
|
||||||
|
- name: Solve Issue
|
||||||
|
env:
|
||||||
|
GITEA_URL: ${{ secrets.GITEA_URL }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
REPO_OWNER: ${{ github.repository_owner }}
|
||||||
|
REPO_NAME: ${{ github.event.repository.name }}
|
||||||
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
|
run: solve-issue
|
||||||
44
.gitea/workflows/deploy.yml
Normal file
44
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# .gitea/workflows/deploy.yml
|
||||||
|
name: CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, staging]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- run: bun ci
|
||||||
|
- run: bun test
|
||||||
|
|
||||||
|
# Preview - handled automatically by Coolify!
|
||||||
|
# No action needed here
|
||||||
|
|
||||||
|
deploy-staging:
|
||||||
|
needs: test
|
||||||
|
if: github.ref == 'refs/heads/staging'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger Coolify Staging Deploy
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
|
||||||
|
"${{ secrets.COOLIFY_URL }}/api/v1/applications/${{ secrets.COOLIFY_STAGING_APP_ID }}/deploy"
|
||||||
|
|
||||||
|
deploy-prod:
|
||||||
|
needs: test
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger Coolify Production Deploy
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
|
||||||
|
"${{ secrets.COOLIFY_URL }}/api/v1/applications/${{ secrets.COOLIFY_PROD_APP_ID }}/deploy"
|
||||||
Reference in New Issue
Block a user