Skip to content

Commit

Permalink
Remove set-env usage (dapr#351)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tcnghia authored Oct 9, 2020
1 parent 9076d9f commit ff8d580
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit ff8d580

Please sign in to comment.