Update docker build actions to manual trigger
This commit is contained in:
parent
f961b786da
commit
67b9c8a173
@ -1,14 +1,19 @@
|
|||||||
name: Occlum Docker Build and Push
|
name: Occlum Docker Build and Push
|
||||||
|
|
||||||
# Triggers the workflow on pre-release events
|
# This is a manual trigger.
|
||||||
on:
|
on:
|
||||||
release:
|
workflow_dispatch:
|
||||||
types: [prereleased]
|
inputs:
|
||||||
|
OS:
|
||||||
|
description: 'OS name (must choose from <centos, ubuntu>)'
|
||||||
|
required: true
|
||||||
|
default: 'ubuntu'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-centos-image:
|
generate-centos-image:
|
||||||
# GitHub Actions doesn't have CentOS VM provided
|
# GitHub Actions doesn't have CentOS VM provided
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
if: github.event.inputs.OS == 'centos'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare tools
|
- name: Prepare tools
|
||||||
@ -25,9 +30,8 @@ jobs:
|
|||||||
cp -r tools/toolchains .
|
cp -r tools/toolchains .
|
||||||
cp -r tools/docker .
|
cp -r tools/docker .
|
||||||
|
|
||||||
- name: Get release version
|
- name: Get Occlum release version
|
||||||
id: get_version
|
run: echo "RELEASE_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV;
|
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
# GITHUB_REF=refs/heads/branch-name
|
# GITHUB_REF=refs/heads/branch-name
|
||||||
@ -61,6 +65,7 @@ jobs:
|
|||||||
|
|
||||||
generate-ubuntu-image:
|
generate-ubuntu-image:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
if: github.event.inputs.OS == 'ubuntu'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -73,9 +78,8 @@ jobs:
|
|||||||
cp -r tools/toolchains .
|
cp -r tools/toolchains .
|
||||||
cp -r tools/docker .
|
cp -r tools/docker .
|
||||||
|
|
||||||
- name: Get release version
|
- name: Get Occlum release version
|
||||||
id: get_version
|
run: echo "RELEASE_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV;
|
||||||
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV;
|
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
# GITHUB_REF=refs/heads/branch-name
|
# GITHUB_REF=refs/heads/branch-name
|
||||||
|
Loading…
Reference in New Issue
Block a user