From ff8d580990b1e0def8096430a8b9b0c7876e9d2d Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Thu, 8 Oct 2020 20:12:06 -0700 Subject: [PATCH] Remove set-env usage (#351) https://nvd.nist.gov/vuln/detail/CVE-2020-15228 advises that setenv and add-path are not secure, so they will be disabled very shortly on workflows. This changes set-env to the recommended upgrade. --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cd7aebca..c20f9afb8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,13 +117,15 @@ jobs: - name: Get pom parent version run: | PARENT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) - echo "##[set-env name=PARENT_VERSION;]$PARENT_VERSION" + echo "PARENT_VERSION=$PARENT_VERSION" >> $GITHUB_ENV - name: Is SNAPSHOT release ? if: contains(github.ref, 'master') && contains(env.PARENT_VERSION, '-SNAPSHOT') - run: echo "##[set-env name=DEPLOY_OSSRH;]true" + run: | + echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV - name: Is Release or RC version ? if: startswith(github.ref, 'refs/tags/v') && !contains(env.PARENT_VERSION, '-SNAPSHOT') - run: echo "##[set-env name=DEPLOY_OSSRH;]true" + run: | + echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV - name: Publish to ossrh if: env.DEPLOY_OSSRH == 'true' run: |