File tree Expand file tree Collapse file tree 2 files changed +40
-20
lines changed Expand file tree Collapse file tree 2 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,6 @@ name: Release Self-Hosted Images
22
33on :
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
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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments