-
Notifications
You must be signed in to change notification settings - Fork 24
42 lines (38 loc) · 1.24 KB
/
reusable-bundle-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Docker image architecture bundling
on:
workflow_call:
inputs:
image_name:
required: false
default: 'autoware/model-zoo-tvm-cli'
type: string
tag_name:
required: false
default: 'latest'
type: string
secrets:
DKR_USR:
required: true
DKR_PASS:
required: true
jobs:
arch-bundle:
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ inputs.image_name }}
TAG_NAME: ${{ inputs.tag_name }}
steps:
- name: Manifest build and push
run: |
docker login -u "${{ secrets.DKR_USR }}" -p "${{ secrets.DKR_PASS }}"
export DOCKER_CLI_EXPERIMENTAL=enabled
docker manifest create $IMAGE_NAME:$TAG_NAME --amend $IMAGE_NAME:$TAG_NAME-amd64 --amend $IMAGE_NAME:$TAG_NAME-arm64
docker manifest push $IMAGE_NAME:$TAG_NAME
- name: Manifest build and push cuda
run: |
export DOCKER_CLI_EXPERIMENTAL=enabled
docker manifest create $IMAGE_NAME:$TAG_NAME-cuda --amend $IMAGE_NAME:$TAG_NAME-cuda-amd64 --amend $IMAGE_NAME:$TAG_NAME-cuda-arm64
docker manifest push $IMAGE_NAME:$TAG_NAME-cuda
- name: Docker logout
if: ${{ always() }}
run: docker logout