Skip to content

Deploy docker image wrapping cloud orchestrator #8

Deploy docker image wrapping cloud orchestrator

Deploy docker image wrapping cloud orchestrator #8

Workflow file for this run

name: DockerImage
on: [pull_request, push]
jobs:
build-cuttlefish-cloud-orchestration-x86_64-docker-image:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Get docker image filename and tag
run: |
short_sha=$(echo ${{ github.sha }} | cut -c1-8)
echo "image_path=cloud-orchestration-docker-image-x86_64-${short_sha}.tar" >> $GITHUB_ENV
echo "image_tag=cuttlefish-cloud-orchestration:${short_sha}" >> $GITHUB_ENV
- name: Build docker image
run: docker build --force-rm --no-cache -t ${{ env.image_tag }} .
- name: Save docker image
run: docker save --output ${{ env.image_path }} ${{ env.image_tag }}
- name: Publish docker image
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
with:
name: docker-image-x86_64
path: ${{ env.image_path }}
build-cuttlefish-cloud-orchestration-arm64-docker-image:
runs-on: arm-ubuntu-arm-22.04-4core
steps:
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Get docker image filename and tag
run: |
short_sha=$(echo ${{ github.sha }} | cut -c1-8)
echo "image_path=cloud-orchestration-docker-image-arm64-${short_sha}.tar" >> $GITHUB_ENV
echo "image_tag=cuttlefish-cloud-orchestration:${short_sha}" >> $GITHUB_ENV
- name: Build docker image
run: docker build --force-rm --no-cache -t ${{ env.image_tag }} .
- name: Save docker image
run: docker save --output ${{ env.image_path }} ${{ env.image_tag }}
- name: Publish docker image
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # aka v4.0.0
with:
name: docker-image-arm64
path: ${{ env.image_path }}