-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (78 loc) · 2.56 KB
/
ghcr.io.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: build & push
on:
push:
tags:
- v*
workflow_dispatch:
env:
# Uses docker.io if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_PREFIX: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
bench:
- helloworld
- chameleon
- cnn_serving
- image_processing
- json_serdes
- lr_serving
- lr_training
- matmul
- pyaes
- rnn_serving
- video_processing
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract repository metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.bench }}
labels: |
maintainer=${{ github.repository_owner }}
org.opencontainers.image.title=${{ env.IMAGE_PREFIX }}-${{ matrix.bench }}
org.opencontainers.image.description=AERO port of FunctionBench "${{ matrix.bench }}".
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.licenses=Apache-2.0
flavor: latest=false
tags: |
type=semver,priority=900,prefix=,suffix=,pattern={{version}},value=
type=edge,priority=700,prefix=,suffix=,branch=$repo.default_branch
type=sha,priority=100,prefix={{branch}}-
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- name: Hard link server.py
run: ln server.py benches/${{ matrix.bench }}/
- name: Build and push image
uses: docker/build-push-action@v5
with:
file: benches/${{ matrix.bench }}/Dockerfile
context: benches/${{ matrix.bench }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: |
linux/amd64
linux/arm64/v8
pull: true
push: true
#cache-from: type=gha
#cache-to: type=gha,mode=max
no-cache: true