Skip to content

Expand MP3 Quick Cleanse release metadata #117

Expand MP3 Quick Cleanse release metadata

Expand MP3 Quick Cleanse release metadata #117

Workflow file for this run

name: CD – Deploy to Hyperlift

Check failure on line 1 in .github/workflows/cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cd.yml

Invalid workflow file

(Line: 52, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.HYPERLIFT_DEPLOY_HOOK != ''
on:
# Only deploy when CI passes on main
workflow_run:
workflows: ["CI"]
branches: ["main"]
types: [completed]
jobs:
deploy:
name: Push image & trigger Hyperlift deploy
runs-on: ubuntu-latest
# Skip if the triggering CI run failed
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# ── Push to Docker Hub ────────────────────────────────────────────────
# Requires two repository secrets:
# DOCKERHUB_USERNAME – your Docker Hub username
# DOCKERHUB_TOKEN – a Docker Hub access token (not your password)
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
# Tags: latest + the exact commit SHA for traceability
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/spectracleanse-api:latest
${{ secrets.DOCKERHUB_USERNAME }}/spectracleanse-api:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
# ── Notify Hyperlift ──────────────────────────────────────────────────
# Hyperlift can redeploy automatically when the image tag changes,
# or you can trigger it via its deploy webhook.
# Add your webhook URL as the repository secret HYPERLIFT_DEPLOY_HOOK.
- name: Trigger Hyperlift redeploy
if: ${{ secrets.HYPERLIFT_DEPLOY_HOOK != '' }}
run: |
curl -sf -X POST "${{ secrets.HYPERLIFT_DEPLOY_HOOK }}" \
-H "Content-Type: application/json" \
-d '{"ref":"${{ github.sha }}"}'
- name: Confirm deployment triggered
run: echo "Deployed ${{ github.sha }} to Hyperlift"