Skip to content

feat(deploy): add local deployment scripts for highest velocity #9

feat(deploy): add local deployment scripts for highest velocity

feat(deploy): add local deployment scripts for highest velocity #9

Workflow file for this run

name: Build Docker Image
on:
push:
branches: [main]
schedule:
- cron: '0 2 * * 0' # Weekly rebuild (Sunday 2am UTC) for base image security patches
workflow_dispatch: # Manual trigger option
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# Prevent overlapping deployments
concurrency:
group: deploy-main
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Log in to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Extract metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix={{branch}}-
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build summary
run: |
echo "✅ Docker image built and pushed successfully"
echo ""
echo "📦 Image: ghcr.io/${{ github.repository }}:latest"
echo ""
echo "🚀 To deploy, run locally:"
echo " ./scripts/deploy.sh"
echo ""
echo "⚡ Or for quick deploy:"
echo " ./scripts/quick-deploy.sh"