-
Notifications
You must be signed in to change notification settings - Fork 159
61 lines (55 loc) · 1.68 KB
/
build-dev-docker.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
name: Build docker image for CI/CD infra
on:
push:
branches:
- master
- release/*
paths:
- '.github/workflows/build-dev-docker.yml'
- 'infra/docker/**'
pull_request:
branches:
- master
- release/*
paths:
- '.github/workflows/build-dev-docker.yml'
- 'infra/docker/**'
jobs:
# Build on docker CLI for PR test without login
build-pr-test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 'android-sdk', 'focal', 'jammy', 'noble' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker Image
run: |
./nnas build-docker-image --codename ${{ matrix.version }} --tag one-test
- name: Test onert build
if: matrix.version != 'android-sdk'
run: |
DOCKER_IMAGE_NAME=one-test ./nnas docker-run make -f Makefile.template
# Use github action for build and push to docker hub
build-docker-image:
if: github.event_name == 'push' && github.repository_owner == 'Samsung'
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 'android-sdk', 'focal', 'jammy', 'noble' ]
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
file: ./infra/docker/${{ matrix.version }}/Dockerfile
push: true
tags: nnfw/one-devtools:${{ matrix.version }}