Skip to content

Commit ec03451

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Split out the self-host latest-tagging job from the releasing job (#40932)
Allows us to release on every push to release branch, but only tag manually once/week when we want to deploy a new self-host. GitOrigin-RevId: 1690d64c40484b52ac362f6132df7c2077df119d
1 parent da6f12d commit ec03451

File tree

2 files changed

+40
-20
lines changed

2 files changed

+40
-20
lines changed

.github/workflows/release_self_hosted_images.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ name: Release Self-Hosted Images
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
tag_latest:
7-
description: "Tag images as latest"
8-
type: boolean
9-
default: true
10-
required: true
115
push:
126
branches:
137
- release
@@ -54,23 +48,9 @@ jobs:
5448
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_arm64_digest }}
5549
docker manifest push ghcr.io/get-convex/convex-backend:${{ github.sha }}
5650
57-
if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then
58-
docker manifest create ghcr.io/get-convex/convex-backend:latest \
59-
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_x64_digest }} \
60-
--amend ghcr.io/get-convex/convex-backend@${{ needs.release_backend.outputs.backend_arm64_digest }}
61-
docker manifest push ghcr.io/get-convex/convex-backend:latest
62-
fi
63-
6451
- name: Tag and push dashboard manifest
6552
run: |
6653
docker manifest create ghcr.io/get-convex/convex-dashboard:${{ github.sha }} \
6754
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_x64_digest }} \
6855
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_arm64_digest }}
6956
docker manifest push ghcr.io/get-convex/convex-dashboard:${{ github.sha }}
70-
71-
if [[ "${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest || false }}" == "true" ]]; then
72-
docker manifest create ghcr.io/get-convex/convex-dashboard:latest \
73-
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_x64_digest }} \
74-
--amend ghcr.io/get-convex/convex-dashboard@${{ needs.release_dashboard.outputs.dashboard_arm64_digest }}
75-
docker manifest push ghcr.io/get-convex/convex-dashboard:latest
76-
fi
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Tag Self-Hosted Images as latest
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
github_sha:
7+
description: "Rev to tag as latest. Pick from https://github.com/get-convex/convex-backend/pkgs/container/convex-backend"
8+
type: string
9+
required: true
10+
11+
jobs:
12+
tag_images_as_latest:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v2
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Modify convex-backend manifest with latest tag
23+
run: |
24+
digests=$(docker manifest inspect ghcr.io/get-convex/convex-backend:${{ inputs.github_sha }} | jq -r '.manifests[].digest')
25+
args=()
26+
for digest in $digests; do
27+
args+=(--amend "ghcr.io/get-convex/convex-backend@$digest")
28+
done
29+
docker manifest create ghcr.io/get-convex/convex-backend:latest "${args[@]}"
30+
docker manifest push ghcr.io/get-convex/convex-backend:latest
31+
32+
- name: Modify dashboard manifest with latest tag
33+
run: |
34+
digests=$(docker manifest inspect ghcr.io/get-convex/convex-dashboard:${{ inputs.github_sha }} | jq -r '.manifests[].digest')
35+
args=()
36+
for digest in $digests; do
37+
args+=(--amend "ghcr.io/get-convex/convex-dashboard@$digest")
38+
done
39+
docker manifest create ghcr.io/get-convex/convex-dashboard:latest "${args[@]}"
40+
docker manifest push ghcr.io/get-convex/convex-dashboard:latest

0 commit comments

Comments
 (0)