-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
GITHUB_WORKSPACE evaluting to blank #1794
Comments
Hello @timheuer , you use incorrect way to reference this variable.
If you would like to use
Please follow documentation: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context |
That's the confusing part. Yes, you can directly use the GitHub context Since we know this Is there an easy way to test commands on a local runner without requiring a trigger? Running commands inside PowerShell only gets you so far, especially when you rely on the way Actions packs up the steps as ps1 files. |
I don't have much context about this logic because it is owned by https://github.com/actions/runner.
so you can access only variables that are set in YAML like below or similar
|
Closing this one but please let me know if you have any questions |
#87 test with suggestion from actions/runner-images#1794
I just ran into this same issue, thinking I could use "${{ env:GITHUB_WORKSPACE }}" |
Ran into this as well... these variables are still called out in this doc here: https://docs.github.com/en/actions/learn-github-actions/variables (which I find very unhelpful at explaining how to setup and use The note in blue at the bottom of the long list of variable examples is not highlighted well enough:
|
* Moved project heads to common folder * Fixed broken reference to props file * Fix broken path references * Fixed broken file references * Fixed broken path * Move asset references to props file * Consolidated ProjectHeads and supporting infrastructure * Migrating projects to new infra * Migrating files to new infra * Added missing assemblyname and rootnamespace declaration * Fixed building WinAppSdk * Fixed build errors for UWP under "All" solution * Fixed working directory for UseTargetFrameworks.ps1 * Switch GenerateSingleSampleHeads.ps1 to use dotnet templating tool Update WindowsAppSDK version and MSTest tools Add properties to allow tests to run on 1.2.x, see microsoft/testfx#1127 Remove solution files from experiments Add bat file to copy heads and run slngen Tested locally running all heads and tests for an experiment * Update folder for linux CI build and Codespaces to WASM project * Clean-up and re-work build script for testing the project template * Use expanded form for environment variables everywhere * Use repo root path for script when in working directory of template * Use github syntax for environment variable for path, see actions/runner-images#1794 * Re-work path structure for project template test in ci * Setup paths again to use full path into GenerateSingleSampleHeads script * Fixed comment referencing outdated file name * Use absolute path for project references in the "All" solution * Removed leading directory separator on generated path * Update slngen to fix build issues with not finding SDK due to global.json See details in microsoft/slngen#453 * Add flag to build to enable easily getting diagnostics from tools * Clean-up labels and conditions for diagnostics * Add COREHOST_TRACE diagnostics for dotnet * Move conditional for COREHOST_TRACE into step * Just have COREHOST_TRACE defined at top * Add calling dotnet --info * Fixed missing markdown/cs files. Changed "Experiment" to "ToolkitComponent" * Revert initial work renaming Experiment to Component. * Fixed markdown exclude path * Moved project out of double nested folder * Removed restored files that should have been deleted * Move SourceGenerators.Tests project up a folder and fix in build.yml path Wasn't being built as was excluded from wildcard in solution generator * Fixed path for test output * Improved and shortened project names * Rename LabsUITestMethod to UIThreadTestMethod * Renamed to CommunityToolkit.Tooling.TestGen * New names for UITestMethodAttribute and UITestMethodGenerator * Fixed incorrect namespace * Fixed a bad find/replace * Renamed "all" component heads and App/Test shared projects * Added "App" to app head names * Fixed runtime error * Move SourceGenerators.Tests project up a folder and fix in build.yml path Wasn't being built as was excluded from wildcard in solution generator * Fixed path for test output * Improved and shortened project names * Rename LabsUITestMethod to UIThreadTestMethod * Renamed to CommunityToolkit.Tooling.TestGen * New names for UITestMethodAttribute and UITestMethodGenerator * Renamed "all" component heads and App/Test shared projects * Added "App" to app head names * Turn off diagnostics for our powershell scripts as slngen has error with diagnostics Fix diagnostic flag detection * Enable git long path support for the clean operation * Update microsoft/setup-msbuild github action * Cleaned up moved files that weren't deleted properly * Update slngen to 9.5.4 Should hopefully resolve CI issues from microsoft/slngen#453 and its initial fix --------- Co-authored-by: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
* Moved project heads to common folder * Fixed broken reference to props file * Fix broken path references * Fixed broken file references * Fixed broken path * Move asset references to props file * Consolidated ProjectHeads and supporting infrastructure * Migrating projects to new infra * Migrating files to new infra * Added missing assemblyname and rootnamespace declaration * Fixed building WinAppSdk * Fixed build errors for UWP under "All" solution * Fixed working directory for UseTargetFrameworks.ps1 * Switch GenerateSingleSampleHeads.ps1 to use dotnet templating tool Update WindowsAppSDK version and MSTest tools Add properties to allow tests to run on 1.2.x, see microsoft/testfx#1127 Remove solution files from experiments Add bat file to copy heads and run slngen Tested locally running all heads and tests for an experiment * Update folder for linux CI build and Codespaces to WASM project * Clean-up and re-work build script for testing the project template * Use expanded form for environment variables everywhere * Use repo root path for script when in working directory of template * Use github syntax for environment variable for path, see actions/runner-images#1794 * Re-work path structure for project template test in ci * Setup paths again to use full path into GenerateSingleSampleHeads script * Fixed comment referencing outdated file name * Use absolute path for project references in the "All" solution * Removed leading directory separator on generated path * Update slngen to fix build issues with not finding SDK due to global.json See details in microsoft/slngen#453 * Add flag to build to enable easily getting diagnostics from tools * Clean-up labels and conditions for diagnostics * Add COREHOST_TRACE diagnostics for dotnet * Move conditional for COREHOST_TRACE into step * Just have COREHOST_TRACE defined at top * Add calling dotnet --info * Fixed missing markdown/cs files. Changed "Experiment" to "ToolkitComponent" * Revert initial work renaming Experiment to Component. * Fixed markdown exclude path * Moved project out of double nested folder * Removed restored files that should have been deleted * Move SourceGenerators.Tests project up a folder and fix in build.yml path Wasn't being built as was excluded from wildcard in solution generator * Fixed path for test output * Improved and shortened project names * Rename LabsUITestMethod to UIThreadTestMethod * Renamed to CommunityToolkit.Tooling.TestGen * New names for UITestMethodAttribute and UITestMethodGenerator * Fixed incorrect namespace * Fixed a bad find/replace * Renamed "all" component heads and App/Test shared projects * Added "App" to app head names * Fixed runtime error * Move SourceGenerators.Tests project up a folder and fix in build.yml path Wasn't being built as was excluded from wildcard in solution generator * Fixed path for test output * Improved and shortened project names * Rename LabsUITestMethod to UIThreadTestMethod * Renamed to CommunityToolkit.Tooling.TestGen * New names for UITestMethodAttribute and UITestMethodGenerator * Renamed "all" component heads and App/Test shared projects * Added "App" to app head names * Turn off diagnostics for our powershell scripts as slngen has error with diagnostics Fix diagnostic flag detection * Enable git long path support for the clean operation * Update microsoft/setup-msbuild github action * Cleaned up moved files that weren't deleted properly * Update slngen to 9.5.4 Should hopefully resolve CI issues from microsoft/slngen#453 and its initial fix --------- Co-authored-by: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Description
Per the documentation: https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables
The
GITHUB_WORKSPACE
variable should evaluate to a path. When using in a workflow (after checkout) however, it is evaluating to nothing and not providing the path both on ubuntu-latest/windows-latestExample: https://github.com/timheuer/buildtest/runs/1243185809?check_suite_focus=true#step:3:2 from workflow: https://github.com/timheuer/buildtest/blob/master/.github/workflows/build.yml#L40
Area for Triage:
Servers
Question, Bug, or Feature?:
Bug
Virtual environments affected
Expected behavior
I expect to see a full path to the workspace per documentation
Actual behavior
A blank variable is provided
Repro steps
See example repo that has an echo of the variable evaluating to nothing
The text was updated successfully, but these errors were encountered: