Skip to content

Commit 3ff9535

Browse files
committed
Deploy cuttlefish-cloud-orchestrator into AR
1 parent 40dfc53 commit 3ff9535

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Deploy docker image cuttlefish-cloud-orchestrator'
2+
inputs:
3+
arch:
4+
required: true
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Deploy docker image into Artifact Registry
9+
run: |
10+
# TODO(b/440196950): Setup condition on this step when we build
11+
# stable/unstable versions here too.
12+
13+
# Stable/Unstable version tag : X.Y.Z
14+
# Nightly version tag : gitYYYYMMDD-<Github SHA 8 digit>
15+
DATE=$(date -u +'%Y%m%d')
16+
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)
17+
TAG="git${DATE}-${SHORT_SHA}-${{ inputs.arch }}"
18+
REMOTE_IMAGE_TAG=us-docker.pkg.dev/android-cuttlefish-artifacts/cuttlefish-orchestration/cuttlefish-cloud-orchestrator:${TAG}
19+
20+
docker tag cuttlefish-cloud-orchestrator ${REMOTE_IMAGE_TAG}
21+
docker push ${REMOTE_IMAGE_TAG}
22+
shell: bash

.github/workflows/deployment.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,39 @@ jobs:
5252
uses: ./.github/actions/deploy-cuttlefish-cvdremote-debian-package
5353
with:
5454
path: ${{ env.path }}
55+
56+
deploy-cuttlefish-cloud-orchestrator-amd64-docker-image:
57+
if: github.repository_owner == 'google'
58+
environment: deployment
59+
runs-on: ubuntu-24.04
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
63+
- name: Build docker image
64+
run: docker build -t cuttlefish-cloud-orchestrator .
65+
- name: Authentication on GCP project android-cuttlefish-artifacts
66+
uses: 'google-github-actions/auth@v2'
67+
with:
68+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
69+
- name: Deploy docker image
70+
uses: ./.github/actions/deploy-cuttlefish-cloud-orchestrator-docker-image
71+
with:
72+
arch: amd64
73+
74+
deploy-cuttlefish-cloud-orchestrator-arm64-docker-image:
75+
if: github.repository_owner == 'google'
76+
environment: deployment
77+
runs-on: ubuntu-24.04-arm
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
81+
- name: Build docker image
82+
run: docker build -t cuttlefish-cloud-orchestrator .
83+
- name: Authentication on GCP project android-cuttlefish-artifacts
84+
uses: 'google-github-actions/auth@v2'
85+
with:
86+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
87+
- name: Deploy docker image
88+
uses: ./.github/actions/deploy-cuttlefish-cloud-orchestrator-docker-image
89+
with:
90+
arch: arm64

0 commit comments

Comments
 (0)