ci: complete CI/CD workflow documentation

هذا الالتزام موجود في:
2026-07-29 04:58:54 +03:00
الأصل 5e4d18fd77
التزام b63080442e
2 ملفات معدلة مع 94 إضافات و0 حذوفات

51
q3-cicd/ghaymah-ci.yml Normal file
عرض الملف

@@ -0,0 +1,51 @@
name: ghaymah_exam CI/CD
on:
push:
branches:
- main
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./q1-deploy-monitor
file: ./q1-deploy-monitor/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/ghaymah-exam-ahmednasser-sre:latest
ghcr.io/${{ github.repository_owner }}/ghaymah-exam-ahmednasser-sre:${{ github.sha }}
deploy-production:
name: Deploy to Production
needs: build-and-push
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Deploy application
run: |
echo "Deploying image to production..."