|
|
|
|
@@ -145,20 +145,13 @@ jobs:
|
|
|
|
|
needs: [detect-changes]
|
|
|
|
|
if: needs.detect-changes.outputs.agent == 'true'
|
|
|
|
|
container:
|
|
|
|
|
image: docker:27-cli
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Build, push and trigger orca redeploy
|
|
|
|
|
- name: Trigger Coolify deploy
|
|
|
|
|
run: |
|
|
|
|
|
apk add --no-cache git curl openssl
|
|
|
|
|
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
|
|
|
|
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
|
|
|
|
|
IMAGE=registry.meghsakha.com/compliance-agent
|
|
|
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login registry.meghsakha.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
|
|
|
|
docker build -f Dockerfile.agent -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
|
|
|
|
|
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
|
|
|
|
|
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy agent"}}' "${GITHUB_SHA}")
|
|
|
|
|
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
|
|
|
|
|
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
|
|
|
|
|
apk add --no-cache curl
|
|
|
|
|
curl -sf "${{ secrets.COOLIFY_WEBHOOK_AGENT }}" \
|
|
|
|
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|
|
|
|
|
|
|
|
|
|
deploy-dashboard:
|
|
|
|
|
name: Deploy Dashboard
|
|
|
|
|
@@ -166,20 +159,13 @@ jobs:
|
|
|
|
|
needs: [detect-changes]
|
|
|
|
|
if: needs.detect-changes.outputs.dashboard == 'true'
|
|
|
|
|
container:
|
|
|
|
|
image: docker:27-cli
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Build, push and trigger orca redeploy
|
|
|
|
|
- name: Trigger Coolify deploy
|
|
|
|
|
run: |
|
|
|
|
|
apk add --no-cache git curl openssl
|
|
|
|
|
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
|
|
|
|
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
|
|
|
|
|
IMAGE=registry.meghsakha.com/compliance-dashboard
|
|
|
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login registry.meghsakha.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
|
|
|
|
docker build -f Dockerfile.dashboard -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
|
|
|
|
|
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
|
|
|
|
|
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy dashboard"}}' "${GITHUB_SHA}")
|
|
|
|
|
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
|
|
|
|
|
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
|
|
|
|
|
apk add --no-cache curl
|
|
|
|
|
curl -sf "${{ secrets.COOLIFY_WEBHOOK_DASHBOARD }}" \
|
|
|
|
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|
|
|
|
|
|
|
|
|
|
deploy-docs:
|
|
|
|
|
name: Deploy Docs
|
|
|
|
|
@@ -187,20 +173,13 @@ jobs:
|
|
|
|
|
needs: [detect-changes]
|
|
|
|
|
if: needs.detect-changes.outputs.docs == 'true'
|
|
|
|
|
container:
|
|
|
|
|
image: docker:27-cli
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Build, push and trigger orca redeploy
|
|
|
|
|
- name: Trigger Coolify deploy
|
|
|
|
|
run: |
|
|
|
|
|
apk add --no-cache git curl openssl
|
|
|
|
|
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
|
|
|
|
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
|
|
|
|
|
IMAGE=registry.meghsakha.com/compliance-docs
|
|
|
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login registry.meghsakha.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
|
|
|
|
docker build -f Dockerfile.docs -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
|
|
|
|
|
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
|
|
|
|
|
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy docs"}}' "${GITHUB_SHA}")
|
|
|
|
|
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
|
|
|
|
|
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
|
|
|
|
|
apk add --no-cache curl
|
|
|
|
|
curl -sf "${{ secrets.COOLIFY_WEBHOOK_DOCS }}" \
|
|
|
|
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|
|
|
|
|
|
|
|
|
|
deploy-mcp:
|
|
|
|
|
name: Deploy MCP
|
|
|
|
|
@@ -208,17 +187,10 @@ jobs:
|
|
|
|
|
needs: [detect-changes]
|
|
|
|
|
if: needs.detect-changes.outputs.mcp == 'true'
|
|
|
|
|
container:
|
|
|
|
|
image: docker:27-cli
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Build, push and trigger orca redeploy
|
|
|
|
|
- name: Trigger Coolify deploy
|
|
|
|
|
run: |
|
|
|
|
|
apk add --no-cache git curl openssl
|
|
|
|
|
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
|
|
|
|
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
|
|
|
|
|
IMAGE=registry.meghsakha.com/compliance-mcp
|
|
|
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login registry.meghsakha.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
|
|
|
|
docker build -f Dockerfile.mcp -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
|
|
|
|
|
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
|
|
|
|
|
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy mcp"}}' "${GITHUB_SHA}")
|
|
|
|
|
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
|
|
|
|
|
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
|
|
|
|
|
apk add --no-cache curl
|
|
|
|
|
curl -sf "${{ secrets.COOLIFY_WEBHOOK_MCP }}" \
|
|
|
|
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|
|
|
|
|
|