|
19 | 19 | uses: ./.github/workflows/release_local_backend.yml
|
20 | 20 | with:
|
21 | 21 | # Do not tag docker images triggered by migrations as latest.
|
22 |
| - tag_latest: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }} |
| 22 | + tag_latest: false |
23 | 23 | permissions:
|
24 | 24 | contents: read
|
25 | 25 | packages: write
|
|
28 | 28 | release_dashboard:
|
29 | 29 | uses: ./.github/workflows/release_local_dashboard.yml
|
30 | 30 | with:
|
31 |
| - # Do not tag docker images triggered by migrations as latest. |
32 |
| - tag_latest: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }} |
| 31 | + # Do not tag docker images yet |
| 32 | + tag_latest: false |
33 | 33 | permissions:
|
34 | 34 | contents: read
|
35 | 35 | packages: write
|
|
39 | 39 | needs: release_backend
|
40 | 40 | uses: ./.github/workflows/test_self_hosted_backend.yml
|
41 | 41 | with:
|
42 |
| - git_sha: ${{ github.sha }} |
| 42 | + image_digest_x64: ${{ fromJson(needs.release_backend.outputs.result).digest['backend-x64'] }} |
| 43 | + image_digest_arm64: ${{ fromJson(needs.release_backend.outputs.result).digest['backend-arm64'] }} |
| 44 | + |
| 45 | + tag_images: |
| 46 | + needs: [release_backend, release_dashboard, test_backend] |
| 47 | + # Only run this job if the tests passed |
| 48 | + if: success() |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - name: Login to GitHub Container Registry |
| 52 | + uses: docker/login-action@v2 |
| 53 | + with: |
| 54 | + registry: ghcr.io |
| 55 | + username: ${{ github.actor }} |
| 56 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + |
| 58 | + - name: Tag and push backend manifest |
| 59 | + run: | |
| 60 | + docker manifest create ghcr.io/get-convex/convex-backend:${{ github.sha }} \ |
| 61 | + --amend ghcr.io/get-convex/convex-backend@${{ fromJson(needs.release_backend.outputs.result).digest['backend-x64'] }} \ |
| 62 | + --amend ghcr.io/get-convex/convex-backend@${{ fromJson(needs.release_backend.outputs.result).digest['backend-arm64'] }} |
| 63 | + docker manifest push ghcr.io/get-convex/convex-backend:${{ github.sha }} |
| 64 | +
|
| 65 | + if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then |
| 66 | + docker manifest create ghcr.io/get-convex/convex-backend:latest \ |
| 67 | + --amend ghcr.io/get-convex/convex-backend@${{ fromJson(needs.release_backend.outputs.result).digest['backend-x64'] }} \ |
| 68 | + --amend ghcr.io/get-convex/convex-backend@${{ fromJson(needs.release_backend.outputs.result).digest['backend-arm64'] }} |
| 69 | + docker manifest push ghcr.io/get-convex/convex-backend:latest |
| 70 | + fi |
| 71 | +
|
| 72 | + - name: Tag and push dashboard manifest |
| 73 | + run: | |
| 74 | + docker manifest create ghcr.io/get-convex/convex-dashboard:${{ github.sha }} \ |
| 75 | + --amend ghcr.io/get-convex/convex-dashboard@${{ fromJson(needs.release_dashboard.outputs.result).digest['dashboard-x64'] }} \ |
| 76 | + --amend ghcr.io/get-convex/convex-dashboard@${{ fromJson(needs.release_dashboard.outputs.result).digest['dashboard-arm64'] }} |
| 77 | + docker manifest push ghcr.io/get-convex/convex-dashboard:${{ github.sha }} |
| 78 | +
|
| 79 | + if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then |
| 80 | + docker manifest create ghcr.io/get-convex/convex-dashboard:latest \ |
| 81 | + --amend ghcr.io/get-convex/convex-dashboard@${{ fromJson(needs.release_dashboard.outputs.result).digest['dashboard-x64'] }} \ |
| 82 | + --amend ghcr.io/get-convex/convex-dashboard@${{ fromJson(needs.release_dashboard.outputs.result).digest['dashboard-arm64'] }} |
| 83 | + docker manifest push ghcr.io/get-convex/convex-dashboard:latest |
| 84 | + fi |
0 commit comments