Skip to content

Commit 101fab4

Browse files
committed
Testing Artifact Registry migration
1 parent 8c72ec9 commit 101fab4

2 files changed

Lines changed: 45 additions & 3 deletions

File tree

.github/actions/build-cuttlefish-cvdremote-debian-package/action.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ runs:
1616
run: apt install -y config-package-dev debhelper-compat devscripts git golang
1717
shell: bash
1818
- name: Build package
19-
run: cd build/debian/cuttlefish_cvdremote && dpkg-buildpackage -i -uc -us -b
19+
run: |
20+
pushd build/debian/cuttlefish_cvdremote
21+
dpkg-buildpackage -i -uc -us -b
22+
popd
23+
mv build/debian/cuttlefish_cvdremote .
2024
shell: bash
2125
- name: Install package
22-
run: dpkg -i build/debian/cuttlefish-cvdremote_*.deb || apt install -y
26+
run: dpkg -i cuttlefish-cvdremote_*.deb || apt install -y
2327
shell: bash
2428
- name: Upload debian package
2529
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
2630
with:
2731
name: cuttlefish-cvdremote-${{ inputs.arch }}
28-
path: build/debian/cuttlefish-cvdremote_*.deb
32+
path: cuttlefish-cvdremote_*.deb

.github/workflows/deployment.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deployment
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
deploy-cuttlefish-cvdremote-x86_64-debian-package:
11+
if: ${{ github.repository_owner == 'google' }}
12+
environment: deployment
13+
runs-on: ubuntu-24.04
14+
container:
15+
image: debian@sha256:9258a75a7e4323c9e5562b361effc84ee747920116d8adfc98a465a5cdc9150e # debian:bookworm-20250407 (amd64)
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
19+
- name: Build debian package cuttlefish-cvdremote
20+
uses: ./.github/actions/build-cuttlefish-cvdremote-debian-package
21+
with:
22+
arch: x86_64
23+
- name: Authentication on GCP project android-cuttlefish-artifacts
24+
uses: 'google-github-actions/auth@v2'
25+
with:
26+
credentials_json: '${{ secrets.ARTIFACT_REGISTRY_UPLOADER }}'
27+
- name: 'Set up Cloud SDK'
28+
uses: 'google-github-actions/setup-gcloud@v3.0.0'
29+
with:
30+
version: '>= 363.0.0'
31+
- name: Deploy deb package into Artifact Registry
32+
if: ${{ github.repository_owner == 'google' }}
33+
run: |
34+
gcloud --project=android-cuttlefish-artifacts \
35+
artifacts apt upload \
36+
android-cuttlefish-nightly \
37+
--location=asia \
38+
--source=$(find . -name cuttlefish-cvdremote_*.deb)

0 commit comments

Comments
 (0)