1717 set-variables :
1818 runs-on : ubuntu-24.04
1919 outputs :
20- version : ${{ steps.define-version.outputs.version }}
20+ debian-version : ${{ steps.define-version.outputs.debian_version }}
21+ docker-version : ${{ steps.define-version.outputs.docker_version }}
2122 steps :
2223 - name : Define version
2324 id : define-version
@@ -26,22 +27,28 @@ jobs:
2627 # TODO(b/440196950): Setup condition for stable channel.
2728 case "${{ inputs.deploy-channel }}" in
2829 unstable)
29- # Unstable version format : X.Y~gitYYYYMMDDHHMM-<Github SHA 8 digit>
30+ # Debian package format : X.Y~gitYYYYMMDDHHMM-<Github SHA 8 digit>
31+ # Docker tag format : X.Y-gitYYYYMMDDHHMM-<Github SHA 8 digit>
3032 SEMVER=$(echo ${{ github.ref_name }} | grep -oE '[0-9]+.[0-9]+')
3133 SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)
32- VERSION="${SEMVER}~git${TIME}-${SHORT_SHA}"
34+ DEBIAN_VERSION="${SEMVER}~git${TIME}-${SHORT_SHA}"
35+ DOCKER_VERSION="${SEMVER}-git${TIME}-${SHORT_SHA}"
3336 ;;
3437 nightly)
35- # Nightly version format : 0~gitYYYYMMDDHHMM-<Github SHA 8 digit>
38+ # Debian package format : 0~gitYYYYMMDDHHMM-<Github SHA 8 digit>
39+ # Docker tag format : gitYYYYMMDDHHMM-<Github SHA 8 digit>
3640 SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)
37- VERSION="0~git${TIME}-${SHORT_SHA}"
41+ DEBIAN_VERSION="0~git${TIME}-${SHORT_SHA}"
42+ DOCKER_VERSION="git${TIME}-${SHORT_SHA}"
3843 ;;
3944 *)
4045 exit 1
4146 ;;
4247 esac
43- echo "version=$VERSION" >> $GITHUB_OUTPUT
44- echo "Version is $VERSION"
48+ echo "debian_version=$DEBIAN_VERSION" >> $GITHUB_OUTPUT
49+ echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
50+ echo "Debian package version is $DEBIAN_VERSION"
51+ echo "Docker tag version is $DOCKER_VERSION"
4552
4653 deploy-cuttlefish-cvdremote-amd64-debian-package :
4754 needs : [set-variables]
5562 - name : Build debian package cuttlefish-cvdremote
5663 uses : ./.github/actions/build-cuttlefish-cvdremote-debian-package
5764 with :
58- version : ${{ needs.set-variables.outputs.version }}
65+ version : ${{ needs.set-variables.outputs.debian- version }}
5966 - name : Get exact filename
6067 run : echo "path=$(find . -name cuttlefish-cvdremote_*.deb)" >> $GITHUB_ENV
6168 - name : Authentication on GCP project android-cuttlefish-artifacts
7986 - name : Build debian package cuttlefish-cvdremote
8087 uses : ./.github/actions/build-cuttlefish-cvdremote-debian-package
8188 with :
82- version : ${{ needs.set-variables.outputs.version }}
89+ version : ${{ needs.set-variables.outputs.debian- version }}
8390 - name : Get exact filename
8491 run : echo "path=$(find . -name cuttlefish-cvdremote_*.deb)" >> $GITHUB_ENV
8592 - name : Authentication on GCP project android-cuttlefish-artifacts
@@ -114,7 +121,7 @@ jobs:
114121 uses : ./.github/actions/deploy-cuttlefish-cloud-orchestrator-docker-image
115122 with :
116123 arch : amd64
117- version : ${{ needs.set-variables.outputs.version }}
124+ version : ${{ needs.set-variables.outputs.docker- version }}
118125
119126 deploy-cuttlefish-cloud-orchestrator-arm64-docker-image :
120127 needs : [set-variables]
@@ -139,7 +146,7 @@ jobs:
139146 uses : ./.github/actions/deploy-cuttlefish-cloud-orchestrator-docker-image
140147 with :
141148 arch : arm64
142- version : ${{ needs.set-variables.outputs.version }}
149+ version : ${{ needs.set-variables.outputs.docker- version }}
143150
144151 deploy-cuttlefish-cloud-orchestrator-docker-manifest :
145152 needs : [deploy-cuttlefish-cloud-orchestrator-amd64-docker-image, deploy-cuttlefish-cloud-orchestrator-arm64-docker-image, set-variables]
@@ -161,7 +168,7 @@ jobs:
161168 - name : Deploy manifests
162169 run : |
163170 IMAGE=us-docker.pkg.dev/android-cuttlefish-artifacts/cuttlefish-orchestration/cuttlefish-cloud-orchestrator
164- VERSION=${{ needs.set-variables.outputs.version }}
171+ VERSION=${{ needs.set-variables.outputs.docker- version }}
165172 for MANIFEST_TAG in ${VERSION} ${{ inputs.deploy-channel }}; do
166173 docker manifest create ${IMAGE}:${MANIFEST_TAG} \
167174 --amend ${IMAGE}:${VERSION}-amd64 \
@@ -208,7 +215,7 @@ jobs:
208215 --project="android-cuttlefish-artifacts" \
209216 --quiet \
210217 --repository="cloud-orchestrator-config"
211- for VERSION in ${{ needs.set-variables.outputs.version }} ${{ inputs.deploy-channel }}; do
218+ for VERSION in ${{ needs.set-variables.outputs.docker- version }} ${{ inputs.deploy-channel }}; do
212219 gcloud artifacts generic upload \
213220 --location="us" \
214221 --package="on-premise-single-server" \
0 commit comments