Skip to content

Commit 8f17dbe

Browse files
Add operations workflow bundle
1 parent 971a2f5 commit 8f17dbe

3 files changed

Lines changed: 117 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
deploy:
17+
name: Deploy placeholder and smoke test
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 30
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
cache: pip
29+
30+
- name: Set up uv
31+
uses: astral-sh/setup-uv@v5
32+
with:
33+
enable-cache: true
34+
35+
- name: Install dependencies
36+
run: uv sync --dev --frozen
37+
38+
- name: TODO - wire deployment target
39+
run: |
40+
echo "TODO: connect a real deployment target for this repository."
41+
echo "Running production-like validation locally until a target exists."
42+
43+
- name: Start production-like stack
44+
run: docker compose --env-file .env.production.example -f docker-compose.prod.yml up -d --build
45+
46+
- name: Run smoke test
47+
run: bash scripts/smoke-test.sh
48+
49+
- name: Collect logs on failure
50+
if: failure()
51+
run: docker compose --env-file .env.production.example -f docker-compose.prod.yml logs --no-color
52+
53+
- name: Tear down stack
54+
if: always()
55+
run: docker compose --env-file .env.production.example -f docker-compose.prod.yml down -v

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
release:
18+
name: Build release artifacts
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
cache: pip
29+
30+
- name: Set up uv
31+
uses: astral-sh/setup-uv@v5
32+
with:
33+
enable-cache: true
34+
35+
- name: Install dependencies
36+
run: uv sync --dev --frozen
37+
38+
- name: Run release checks
39+
run: uv run pytest tests/test_health.py tests/test_ops_api.py
40+
41+
- name: Build API image
42+
run: docker build -f Dockerfile.api -t vidapi-api:${{ github.ref_name }} .
43+
44+
- name: Build worker image
45+
run: docker build -f Dockerfile.worker -t vidapi-worker:${{ github.ref_name }} .
46+
47+
- name: TODO - wire deployment target
48+
run: |
49+
echo "TODO: connect a production deployment target for tagged releases."
50+
echo "This workflow currently validates build artifacts only."
51+
52+
- name: Create GitHub release
53+
if: startsWith(github.ref, 'refs/tags/')
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
generate_release_notes: true

0 commit comments

Comments
 (0)