Skip to content

Commit eecc111

Browse files
committed
Deploy nightly version of cuttlefish-cvdremote into Artifact Registry
1 parent 8c72ec9 commit eecc111

4 files changed

Lines changed: 87 additions & 12 deletions

File tree

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
name: 'Build debian package cuttlefish-cvdremote'
2-
inputs:
3-
arch:
4-
required: true
52
runs:
63
using: "composite"
74
steps:
@@ -16,13 +13,12 @@ runs:
1613
run: apt install -y config-package-dev debhelper-compat devscripts git golang
1714
shell: bash
1815
- name: Build package
19-
run: cd build/debian/cuttlefish_cvdremote && dpkg-buildpackage -i -uc -us -b
16+
run: |
17+
pushd build/debian/cuttlefish_cvdremote
18+
dpkg-buildpackage -i -uc -us -b
19+
popd
20+
mv build/debian/cuttlefish-cvdremote_*.deb .
2021
shell: bash
2122
- name: Install package
22-
run: dpkg -i build/debian/cuttlefish-cvdremote_*.deb || apt install -y
23+
run: dpkg -i cuttlefish-cvdremote_*.deb || apt install -y
2324
shell: bash
24-
- name: Upload debian package
25-
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
26-
with:
27-
name: cuttlefish-cvdremote-${{ inputs.arch }}
28-
path: build/debian/cuttlefish-cvdremote_*.deb
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Deploy debian package cuttlefish-cvdremote'
2+
inputs:
3+
path:
4+
required: true
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: 'Set up Cloud SDK'
9+
uses: 'google-github-actions/setup-gcloud@v3.0.0'
10+
with:
11+
version: '>= 363.0.0'
12+
- name: Deploy deb package into Artifact Registry
13+
run: |
14+
gcloud --project=android-cuttlefish-artifacts \
15+
artifacts apt upload \
16+
android-cuttlefish-nightly \
17+
--location=us \
18+
--source=${{ inputs.path }}
19+
shell: bash

.github/workflows/deployment.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy artifacts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
deploy-cuttlefish-cvdremote-x86_64-debian-package:
13+
if: ${{ github.repository_owner == 'google' }}
14+
environment: deployment
15+
runs-on: ubuntu-24.04
16+
container:
17+
image: debian@sha256:9258a75a7e4323c9e5562b361effc84ee747920116d8adfc98a465a5cdc9150e # debian:bookworm-20250407 (amd64)
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
21+
- name: Build debian package cuttlefish-cvdremote
22+
uses: ./.github/actions/build-cuttlefish-cvdremote-debian-package
23+
- name: Get exact filename
24+
run: echo "path=$(find . -name cuttlefish-cvdremote_*.deb)" >> $GITHUB_ENV
25+
- name: Authentication on GCP project android-cuttlefish-artifacts
26+
uses: 'google-github-actions/auth@v2'
27+
with:
28+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
29+
- name: Deploy debian package cuttlefish-cvdremote
30+
uses: ./.github/actions/deploy-cuttlefish-cvdremote-debian-package
31+
with:
32+
path: ${{ env.path }}
33+
34+
deploy-cuttlefish-cvdremote-arm64-debian-package:
35+
if: ${{ github.repository_owner == 'google' }}
36+
environment: deployment
37+
runs-on: ubuntu-24.04-arm
38+
container:
39+
image: debian@sha256:00cd074b40c4d99ff0c24540bdde0533ca3791edcdac0de36d6b9fb3260d89e2 # debian:bookworm-20250407 (arm64/v8)
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
43+
- name: Build debian package cuttlefish-cvdremote
44+
uses: ./.github/actions/build-cuttlefish-cvdremote-debian-package
45+
- name: Get exact filename
46+
run: echo "path=$(find . -name cuttlefish-cvdremote_*.deb)" >> $GITHUB_ENV
47+
- name: Authentication on GCP project android-cuttlefish-artifacts
48+
uses: 'google-github-actions/auth@v2'
49+
with:
50+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
51+
- name: Deploy debian package cuttlefish-cvdremote
52+
uses: ./.github/actions/deploy-cuttlefish-cvdremote-debian-package
53+
with:
54+
path: ${{ env.path }}

.github/workflows/presubmit.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ jobs:
4040
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
4141
- name: Build debian package cuttlefish-cvdremote
4242
uses: ./.github/actions/build-cuttlefish-cvdremote-debian-package
43+
- name: Upload debian package
44+
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
4345
with:
44-
arch: x86_64
46+
name: cuttlefish-cvdremote-x86_64
47+
path: cuttlefish-cvdremote_*.deb
4548

4649
build-cuttlefish-cvdremote-arm64-debian-package:
4750
runs-on: ubuntu-24.04-arm
@@ -52,8 +55,11 @@ jobs:
5255
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
5356
- name: Build debian package cuttlefish-cvdremote
5457
uses: ./.github/actions/build-cuttlefish-cvdremote-debian-package
58+
- name: Upload debian package
59+
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
5560
with:
56-
arch: arm64
61+
name: cuttlefish-cvdremote-arm64
62+
path: cuttlefish-cvdremote_*.deb
5763

5864
build-cuttlefish-cloud-orchestrator-x86_64-docker-image:
5965
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)