-
Notifications
You must be signed in to change notification settings - Fork 127
78 lines (69 loc) · 3.17 KB
/
release_self_hosted_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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