Release Self-Hosted Images #41
Workflow file for this run
This file contains 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: Release Self-Hosted Images | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_latest: | |
description: "Tag images as latest" | |
type: boolean | |
default: true | |
required: true | |
push: | |
branches: | |
- main | |
paths: | |
- "crates/model/src/migrations.rs" | |
jobs: | |
release_backend: | |
uses: ./.github/workflows/release_local_backend.yml | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
release_dashboard: | |
uses: ./.github/workflows/release_local_dashboard.yml | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
test_backend: | |
needs: release_backend | |
uses: ./.github/workflows/test_self_hosted_backend.yml | |
with: | |
image_digest_x64: ${{ needs.release_backend.outputs.backend_x64_digest }} | |
image_digest_arm64: ${{ needs.release_backend.outputs.backend_arm64_digest }} | |
tag_images: | |
needs: [release_backend, release_dashboard, test_backend] | |
# Only run this job if the tests passed | |
if: success() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag and push backend manifest | |
run: | | |
docker manifest create ghcr.io/get-convex/convex-backend:${{ github.sha }} \ | |
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_x64_digest }} \ | |
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_arm64_digest }} | |
docker manifest push ghcr.io/get-convex/convex-backend:${{ github.sha }} | |
if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then | |
docker manifest create ghcr.io/get-convex/convex-backend:latest \ | |
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_x64_digest }} \ | |
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_arm64_digest }} | |
docker manifest push ghcr.io/get-convex/convex-backend:latest | |
fi | |
- name: Tag and push dashboard manifest | |
run: | | |
docker manifest create ghcr.io/get-convex/convex-dashboard:${{ github.sha }} \ | |
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_x64_digest }} \ | |
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_arm64_digest }} | |
docker manifest push ghcr.io/get-convex/convex-dashboard:${{ github.sha }} | |
if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then | |
docker manifest create ghcr.io/get-convex/convex-dashboard:latest \ | |
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_x64_digest }} \ | |
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_arm64_digest }} | |
docker manifest push ghcr.io/get-convex/convex-dashboard:latest | |
fi |