Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb98391f80 |
@@ -108,15 +108,6 @@ jobs:
|
|||||||
PLAYWRIGHT_TEST_PASS: ${{ secrets.STAGE_TEST_PASS }}
|
PLAYWRIGHT_TEST_PASS: ${{ secrets.STAGE_TEST_PASS }}
|
||||||
|
|
||||||
image:
|
image:
|
||||||
# Builds the portal image and ships it through the same path every
|
|
||||||
# other service in orca-infra uses: push :latest + :sha-<sha> to
|
|
||||||
# registry.meghsakha.com, then POST a github-style payload to the
|
|
||||||
# orca webhook so the master pulls and redeploys breakpilot-portal.
|
|
||||||
#
|
|
||||||
# Webhook target (registered once on the master via
|
|
||||||
# orca webhooks add --repo platform/portal \
|
|
||||||
# --service breakpilot-portal --branch main
|
|
||||||
# ) accepts unsigned payloads — orca matches on repo + branch.
|
|
||||||
needs: [shared, test]
|
needs: [shared, test]
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && hashFiles('Dockerfile') != ''
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && hashFiles('Dockerfile') != ''
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
@@ -124,28 +115,18 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: registry.meghsakha.com
|
registry: registry.breakpilot.com
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASS }}
|
password: ${{ secrets.REGISTRY_PASS }}
|
||||||
- uses: docker/build-push-action@v6
|
- uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
registry.meghsakha.com/breakpilot/portal:latest
|
registry.breakpilot.com/${{ github.event.repository.name }}:sha-${{ github.sha }}
|
||||||
registry.meghsakha.com/breakpilot/portal:sha-${{ github.sha }}
|
registry.breakpilot.com/${{ github.event.repository.name }}:env-stage
|
||||||
- name: trigger orca redeploy
|
- uses: anchore/sbom-action@v0
|
||||||
# Signs the POST with HMAC-SHA256 over the JSON body using the
|
with:
|
||||||
# secret orca generated when the webhook was registered. Orca's
|
image: registry.breakpilot.com/${{ github.event.repository.name }}:sha-${{ github.sha }}
|
||||||
# endpoint is publicly reachable on the master, so the signature
|
- run: orca apply --env=stage --image-tag=sha-${{ github.sha }}
|
||||||
# gates who can fire a deploy.
|
|
||||||
env:
|
env:
|
||||||
ORCA_WEBHOOK_SECRET: ${{ secrets.ORCA_WEBHOOK_SECRET }}
|
ORCA_TOKEN: ${{ secrets.ORCA_STAGE_TOKEN }}
|
||||||
run: |
|
|
||||||
BODY='{"repository":{"full_name":"platform/portal"},"ref":"refs/heads/main"}'
|
|
||||||
SIG="sha256=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$ORCA_WEBHOOK_SECRET" -hex | awk '{print $NF}')"
|
|
||||||
curl -ksSf -X POST \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "X-GitHub-Event: push" \
|
|
||||||
-H "X-Hub-Signature-256: $SIG" \
|
|
||||||
-d "$BODY" \
|
|
||||||
https://46.225.100.82:6880/api/v1/webhooks/github
|
|
||||||
|
|||||||
Reference in New Issue
Block a user