Skip to content

Commit 8962035

Browse files
Refactor Github Action per b/485167538
1 parent e854ab5 commit 8962035

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/artifacts.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
echo "x86_64_image_path=orchestration-image-x86_64-${short_sha}.tar" >> $GITHUB_ENV
2121
echo "image_name=cuttlefish-orchestration:${short_sha}" >> $GITHUB_ENV
2222
- name: Build docker image
23-
run: docker/image-builder.sh -t ${{ env.image_name }}
23+
run: docker/image-builder.sh -t ${IMAGE_NAME}
2424
- name: Save docker image
25-
run: docker save --output ${{ env.x86_64_image_path }} ${{ env.image_name }}
25+
run: docker save --output ${X86_64_IMAGE_PATH} ${IMAGE_NAME}
2626
- name: Publish docker image
2727
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
2828
with:
@@ -39,9 +39,9 @@ jobs:
3939
echo "arm64_image_path=orchestration-image-arm64-${short_sha}.tar" >> $GITHUB_ENV
4040
echo "image_name=cuttlefish-orchestration:${short_sha}" >> $GITHUB_ENV
4141
- name: Build docker image
42-
run: docker/image-builder.sh -t ${{ env.image_name }}
42+
run: docker/image-builder.sh -t ${IMAGE_NAME}
4343
- name: Save docker image
44-
run: docker save --output ${{ env.arm64_image_path }} ${{ env.image_name }}
44+
run: docker save --output ${ARM64_IMAGE_PATH} ${IMAGE_NAME}
4545
- name: Publish docker image
4646
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
4747
with:

.github/workflows/host-image-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
- name: Prepare building environment
3434
run: apt-get update && apt-get upgrade -y && apt-get install -y sudo wget libarchive-tools xorriso cpio xz-utils fdisk
3535
- name: Inject name and ID into preseed
36-
run: echo "CI_PROJECT_NAME=${{ github.event.repository.name }}" >> tools/cuttlefish-host-image-installer/preseed/after_install_1.sh && echo "CI_PIPELINE_ID=${{ github.repository}}/${{ github.workflow }}" >> tools/cuttlefish-host-image-installer/preseed//after_install_1.sh
36+
run: echo "CI_PROJECT_NAME=${GITHUB_EVENT_REPOSITORY_NAME}" >> tools/cuttlefish-host-image-installer/preseed/after_install_1.sh && echo "CI_PIPELINE_ID=${{ github.repository}}/${GITHUB_WORKFLOW}" >> tools/cuttlefish-host-image-installer/preseed//after_install_1.sh
37+
env:
38+
GITHUB_EVENT_REPOSITORY_NAME: ${{ github.event.repository.name }}
3739
- name: Download Debian installer
3840
run: cd tools/cuttlefish-host-image-installer && wget -nv -c ${DEBIAN_ISO_URL} && ./addpreseed.sh && xz -9e preseed-mini.iso
3941
- name: Publish preseed-mini.iso.xz

0 commit comments

Comments
 (0)