ci: add GitHub Actions CI/CD pipelines
- Add ci.yml with lint, typecheck, test, build steps + PostgreSQL service - Add deploy.yml scaffold with Docker build placeholders Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
70
.github/workflows/deploy.yml
vendored
Normal file
70
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: Target environment
|
||||
required: true
|
||||
default: staging
|
||||
type: choice
|
||||
options:
|
||||
- staging
|
||||
- production
|
||||
|
||||
concurrency:
|
||||
group: deploy-${{ github.event.inputs.environment }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# TODO: Configure container registry login
|
||||
# - name: Login to Container Registry
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ${{ secrets.REGISTRY_URL }}
|
||||
# username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
# password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
# TODO: Build and push Docker images
|
||||
# - name: Build API image
|
||||
# uses: docker/build-push-action@v6
|
||||
# with:
|
||||
# context: .
|
||||
# file: apps/api/Dockerfile
|
||||
# push: true
|
||||
# tags: ${{ secrets.REGISTRY_URL }}/goodgo-api:${{ github.sha }}
|
||||
# cache-from: type=gha
|
||||
# cache-to: type=gha,mode=max
|
||||
|
||||
- name: Placeholder
|
||||
run: echo "Docker build steps TBD — configure registry and Dockerfiles first"
|
||||
|
||||
deploy:
|
||||
name: Deploy to ${{ github.event.inputs.environment }}
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ github.event.inputs.environment }}
|
||||
|
||||
steps:
|
||||
# TODO: Deploy to Kubernetes
|
||||
# - name: Configure kubectl
|
||||
# uses: azure/setup-kubectl@v4
|
||||
|
||||
# - name: Deploy
|
||||
# run: |
|
||||
# kubectl set image deployment/goodgo-api \
|
||||
# api=${{ secrets.REGISTRY_URL }}/goodgo-api:${{ github.sha }}
|
||||
|
||||
- name: Placeholder
|
||||
run: echo "Deploy steps TBD — configure Kubernetes and environment secrets first"
|
||||
Reference in New Issue
Block a user