mirror of
https://github.com/mblanke/StrikePackageGPT.git
synced 2026-03-01 14:20:21 -05:00
Compare commits
3 Commits
feature/ha
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ff1b0600a2 | |||
| 4a6c613e28 | |||
| c5e60476e2 |
57
.github/workflows/unpack-zip.yml
vendored
Normal file
57
.github/workflows/unpack-zip.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Unpack files.zip
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch containing files.zip'
|
||||
required: true
|
||||
default: 'c2-integration'
|
||||
|
||||
jobs:
|
||||
unpack:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
persist-credentials: true
|
||||
|
||||
- name: Ensure unzip available
|
||||
run: sudo apt-get update -y && sudo apt-get install -y unzip rsync
|
||||
|
||||
- name: Verify files.zip exists
|
||||
run: |
|
||||
if [ ! -f files.zip ]; then
|
||||
echo "ERROR: files.zip not found in repo root on branch ${{ github.event.inputs.branch }}"
|
||||
exit 1
|
||||
fi
|
||||
echo "files.zip found:" && ls -lh files.zip
|
||||
|
||||
- name: Unpack files.zip
|
||||
run: |
|
||||
rm -rf extracted
|
||||
mkdir -p extracted
|
||||
unzip -o files.zip -d extracted
|
||||
echo "Sample extracted files:"
|
||||
find extracted -maxdepth 3 -type f | sed -n '1,200p'
|
||||
|
||||
- name: Copy extracted files into repository
|
||||
run: |
|
||||
rsync -a --exclude='.git' extracted/ .
|
||||
|
||||
- name: Commit and push changes (if any)
|
||||
env:
|
||||
BRANCH: ${{ github.event.inputs.branch }}
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit."
|
||||
else
|
||||
git commit -m "Unpack files.zip into branch ${BRANCH} via workflow"
|
||||
git push origin "HEAD:${BRANCH}"
|
||||
echo "Changes pushed."
|
||||
fi
|
||||
@@ -1,21 +0,0 @@
|
||||
from fastapi import FastAPI
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
import os
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# CORS middleware
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"], # Allows all origins
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"], # Allows all methods
|
||||
allow_headers=["*"], # Allows all headers
|
||||
)
|
||||
|
||||
LLM_ROUTER_URL = os.getenv("LLM_ROUTER_URL", "http://strikepackage-llm-router:8000")
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Hello World"}
|
||||
Reference in New Issue
Block a user