Skip to content

Commit f980deb

Browse files
committed
Deploy nightly version of cuttlefish-orchestration docker image into AR
1 parent b8a601f commit f980deb

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Deploy docker image cuttlefish-orchestration'
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-orchestration:${TAG}
19+
20+
docker tag cuttlefish-orchestration ${REMOTE_IMAGE_TAG}
21+
docker push ${REMOTE_IMAGE_TAG}
22+
shell: bash

.github/workflows/update-cache-and-deployment.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,46 @@ jobs:
9393
uses: ./.github/actions/deploy-debian-packages
9494
with:
9595
path: .
96+
97+
deploy-docker-image-amd64:
98+
runs-on: ubuntu-22.04
99+
steps:
100+
- name: Checkout repository
101+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
102+
- name: Build docker image
103+
run: docker/image-builder.sh
104+
- name: Authentication on GCP project android-cuttlefish-artifacts
105+
uses: 'google-github-actions/auth@v2'
106+
with:
107+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
108+
- name: Login to Artifact Registry
109+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # aka v3.5.0
110+
with:
111+
registry: us-docker.pkg.dev
112+
username: _json_key
113+
password: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
114+
- name: Deploy docker image
115+
uses: ./.github/actions/deploy-docker-image
116+
with:
117+
arch: amd64
118+
deploy-docker-image-arm64:
119+
runs-on: ubuntu-22.04-arm
120+
steps:
121+
- name: Checkout repository
122+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
123+
- name: Build docker image
124+
run: docker/image-builder.sh
125+
- name: Authentication on GCP project android-cuttlefish-artifacts
126+
uses: 'google-github-actions/auth@v2'
127+
with:
128+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
129+
- name: Login to Artifact Registry
130+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # aka v3.5.0
131+
with:
132+
registry: us-docker.pkg.dev
133+
username: _json_key
134+
password: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
135+
- name: Deploy docker image
136+
uses: ./.github/actions/deploy-docker-image
137+
with:
138+
arch: arm64

0 commit comments

Comments
 (0)