From 300518a101e7b40e6b91a8803bb9caa6995c86df Mon Sep 17 00:00:00 2001 From: "Hui, Chunyang" Date: Sun, 15 Nov 2020 12:19:55 +0000 Subject: [PATCH] Use new env configuration for github action --- .github/workflows/build_and_push_ci_image.yml | 6 +++--- .../workflows/build_and_push_docker_image.yml | 4 ++-- .github/workflows/demo_test.yml | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_and_push_ci_image.yml b/.github/workflows/build_and_push_ci_image.yml index 9764bb1c..3d1da3ce 100644 --- a/.github/workflows/build_and_push_ci_image.yml +++ b/.github/workflows/build_and_push_ci_image.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@v2 - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV; # 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 @@ -68,7 +68,7 @@ jobs: uses: actions/checkout@v2 - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV; # 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 @@ -107,7 +107,7 @@ jobs: uses: actions/checkout@v2 - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep 'Version =' src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV; # 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 diff --git a/.github/workflows/build_and_push_docker_image.yml b/.github/workflows/build_and_push_docker_image.yml index d87af830..64afb3a8 100644 --- a/.github/workflows/build_and_push_docker_image.yml +++ b/.github/workflows/build_and_push_docker_image.yml @@ -27,7 +27,7 @@ jobs: - name: Get release version id: get_version - run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) + run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV; - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -67,7 +67,7 @@ jobs: - name: Get release version id: get_version - run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) + run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV; - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/demo_test.yml b/.github/workflows/demo_test.yml index 4a571bd4..2220870d 100644 --- a/.github/workflows/demo_test.yml +++ b/.github/workflows/demo_test.yml @@ -16,7 +16,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=language_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -92,7 +92,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=java_support_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -124,7 +124,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=fish_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -159,7 +159,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=hello_bazel_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -193,7 +193,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=https_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -224,7 +224,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=la_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -251,7 +251,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=sqlite_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -277,7 +277,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=xgboost_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04 @@ -308,7 +308,7 @@ jobs: submodules: true - name: Get occlum version - run: echo ::set-env name=OCCLUM_VERSION::$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}') + run: echo "OCCLUM_VERSION=$(grep "Version =" src/pal/include/occlum_version.h | awk '{print $4}')" >> $GITHUB_ENV - name: Create container run: docker run -itd --name=tflite_test -v $GITHUB_WORKSPACE:/root/occlum occlum/occlum:${{ env.OCCLUM_VERSION }}-ubuntu18.04