Enhance MP3 Quick Cleanse ID3v2.3 metadata writing #116
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CD – Deploy to Hyperlift | ||
| 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" | ||