From e8e53b0661b49a9ecfa1fe2ef5ee846ee0e1ef35 Mon Sep 17 00:00:00 2001 From: Eric Ernst Date: Thu, 14 Jan 2021 20:58:03 -0800 Subject: [PATCH] actions: w/a deprecated set-env set-env is no longer allowed. Updated to use the new recommended syntax. Fixes: #1273 Signed-off-by: Eric Ernst --- .github/workflows/main.yaml | 58 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4cf7f6455..cb7571bdf 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -39,12 +39,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -67,12 +67,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -93,12 +93,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -119,12 +119,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -146,12 +146,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -173,12 +173,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -200,12 +200,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -227,12 +227,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -254,12 +254,12 @@ jobs: run: | if grep -q $buildstr ./artifact-list/artifact-list.txt; then $GITHUB_WORKSPACE/.github/workflows/generate-artifact-tarball.sh $buildstr - echo ::set-env name=artifact-built::true + echo "artifact-built=true" >> $GITHUB_ENV else - echo ::set-env name=artifact-built::false + echo "artifact-built=false" >> $GITHUB_ENV fi - name: store-artifacts - if: env.artifact-built == 'true' + if: ${{ env.artifact-built }} == 'true' uses: actions/upload-artifact@v1 with: name: kata-artifacts @@ -304,9 +304,7 @@ jobs: docker build --build-arg KATA_ARTIFACTS=kata-static.tar.xz -t katadocker/kata-deploy-ci:$pkg_sha ./packaging/kata-deploy docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} docker push katadocker/kata-deploy-ci:$pkg_sha - - echo "##[set-output name=PKG_SHA;]${pkg_sha}" - echo ::set-env name=TAG::$tag + echo "::set-output name=PKG_SHA::${pkg_sha}" - name: test-kata-deploy-ci-in-aks uses: ./packaging/kata-deploy/action with: