I tried to save a bash script into a github env and hope to be able to execute it later
- name: save to env
run: |
echo "SCRIPT=$(cat .github/script.sh)" >> $GITHUB_ENV
I got this error
Error: Unable to process file command 'env' successfully.
Error: Invalid format '# Store the current version number in a variable'
I script.sh content (partially)
#!/bin/bash
# Store the current version number in a variable
current_version=$(jq '.dependencies."main"' package.json | tr -d '"')
I have no issue running sh script.sh in my local, what's wrong with my github action config?