name: Ghaymah CI/CD Pipeline on: push: branches: - main env: REGISTRY: registry.ghaymah.systems IMAGE_NAME: ${{ github.repository }} jobs: build-and-push: runs-on: ubuntu-latest steps: - name: Checkout Source Code uses: actions/checkout@v4 - name: Log in to Ghaymah Container Registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ secrets.GHAYMAH_USERNAME }} password: ${{ secrets.GHAYMAH_TOKEN }} - name: Build and Push Docker Image uses: docker/build-push-action@v5 with: context: ./q1-deploy-monitor push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} deploy-to-production: needs: build-and-push runs-on: ubuntu-latest environment: name: production url: https://prod.ghaymah.systems steps: - name: Deploy to Ghaymah Production run: | echo "Deploying image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} to production..." echo "Deployment Successful!"