forked from inclavare-containers/inclavare-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.46 KB
/
manually_ubuntu_test_image.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
name: Build ubuntu image for rune with docker test
# This is a manual trigger.
on:
workflow_dispatch:
inputs:
occlum_version:
description: 'The version of Occlum image'
required: true
jobs:
generate-ubuntu-image:
# GitHub Actions doesn't have CentOS VM provided
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare work
run: cd $GITHUB_WORKSPACE/.github/workflows/docker;
sed -i "s/OCCLUM_VERSION/${{ github.event.inputs.occlum_version }}/" Dockerfile-ubuntu18.04
# Because "Build and push" step `context` field can't be subdir,
# we need to copy files needed by dockerfile to root dir of the project
- name: Copy context for docker build
run: |
cp -r .github/workflows/docker .
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile-ubuntu18.04
platforms: linux/amd64
push: true
tags: runetest/test:ubuntu18.04-occlum-${{ github.event.inputs.occlum_version }}