Would like to generate a checksum via Github Actions and set to env variable CHECKSUM like so:
- name: Create checksum
run: echo CHECKSUM=$(shasum -a 1 foo.zip | awk '{ print $1 }') >> $CHECKSUM
but it returns an error:
/home/runner/work/_temp/b6f2fd2a-359b-4052-a439-4f5b0a629a85.sh: line 1: $CHECKSUM: ambiguous redirect
Setting environment variables works differently: you append to a file whose name is stored in the $GITHUB_ENV
variable, i.e., something like
run: |
echo CHECKSUM="$(shasum foo.zip | awk '{ print $1 }')" >> "$GITHUB_ENV"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments