-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables unavailable in inlineScript #7
Comments
* Add GITHUB_SHA environment variable This PR makes the GITHUB_SHA default environment variable available to use in inlineScript. This change does not address the issue #7 since it does not pass down all the environment variables (default ones and ones set by the user). This is stopgap solution that should be superseded by a more scalable solution that addresses issue #7 completely. * separate environment variables parameters
* Add GITHUB_SHA environment variable This PR makes the GITHUB_SHA default environment variable available to use in inlineScript. This change does not address the issue #7 since it does not pass down all the environment variables (default ones and ones set by the user). This is stopgap solution that should be superseded by a more scalable solution that addresses issue #7 completely. * separate environment variables parameters
* Add GITHUB_SHA environment variable (#8) * Add GITHUB_SHA environment variable This PR makes the GITHUB_SHA default environment variable available to use in inlineScript. This change does not address the issue #7 since it does not pass down all the environment variables (default ones and ones set by the user). This is stopgap solution that should be superseded by a more scalable solution that addresses issue #7 completely. * separate environment variables parameters * Adding output files
@jalajmsft - why is this closed? Expected behavior as posted by original user is still NOT resolved:
Yep, I need this behavior too because I want to reuse the commands and pass variables depending on environment (dev vs production). This is what I am using and it does not work. - name: "Azure CLI: upload assets to blob storage"
uses: azure/CLI@v1
env:
STORAGE_ACCOUNT: "mystorageaccount"
STORAGE_CONTAINER: "assets"
with:
inlineScript: |
echo "doesn't work $STORAGE_ACCOUNT"
echo "doesn't work either ${{ env.STORAGE_ACCOUNT }}"
echo "so of course below fails"
az storage blob upload-batch \
--account-name ${{ env.STORAGE_ACCOUNT }} \
--source ./public/assets \
--destination ${{ env.STORAGE_CONTAINER }} |
Um, no idea why @ing @jalajmsft unassigned them from issue… sorry 🤷♀️ |
Nevermind, this was fixed in v1.0.3 release, but the commits never referenced this issue |
* add lib and node_modules for release branch (#6) * Users/jaminda/GitHub sha (#9) * Add GITHUB_SHA environment variable (#8) * Add GITHUB_SHA environment variable This PR makes the GITHUB_SHA default environment variable available to use in inlineScript. This change does not address the issue #7 since it does not pass down all the environment variables (default ones and ones set by the user). This is stopgap solution that should be superseded by a more scalable solution that addresses issue #7 completely. * separate environment variables parameters * Adding output files * GITHUB_* enironement variables are available during script execution (#10) (#12) * Allowing white-space characters in environment variables (#14) (#15) * Allow access to user defined variables [Cherry pick from master and build the code for releases] (#17) * Allowing user-defined env variable to be accessible (#16) * Allowing user-defined env variable to be accessible * Resolving PR comments * Cherry pick and compile the code * removing node modules * removing unnecessary files * updating version * update gitignore Co-authored-by: Bishal Prasad <biprasad@microsoft.com> Co-authored-by: Jalaj Minda <49639049+jalajmsft@users.noreply.github.com> Co-authored-by: Kanika Pasrija <kanikapasrija@Kanikas-MacBook-Pro.local>
What's the proper way to use ENV variables in |
Currently, only the GITHUB_WORKSPACE environment variable is set.
The other default environment variables are not available.
Environment variables set by the user in the workflow YAML are also not available.
The documentation regarding create a Docker container action shows that the environment variables are passed to the container here
Expected behaviour:
The text was updated successfully, but these errors were encountered: