Skip to content

Commit

Permalink
RUNNER_TEMP instad of GITHUB_WORKSPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
rajbos authored Jul 21, 2023
1 parent 760708f commit dacb0ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Src/PowerShell/entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function main {
$jsonObject = ($actions | ConvertTo-Json -Depth 10 -Compress)

# store the json in a file and write the path to the output variable
Write-Host "Location: [$($env:GITHUB_WORKSPACE)]"
$filePath = "$($env:GITHUB_WORKSPACE)/used-actions.json"
Write-Host "Location: [$($env:RUNNER_TEMP)]"
$filePath = "$($env:RUNNER_TEMP)/used-actions.json"
Write-Host "Output file path: [$filePath]"
Set-Content -Value "$jsonObject" -Path $filePath
Set-Content -Value "actions-file=$filePath" -Path $env:GITHUB_OUTPUT
Expand All @@ -41,9 +41,6 @@ function main {

# write json content to output variable for backward compatibility (this used to be the only way to get the json)
Add-Content -Value "actions='$jsonObject'" -Path $env:GITHUB_OUTPUT
Write-Host "File contents: "
Write-Host "-----------------"
cat $filePath
Write-Host "GITHUB_OUTPUT File contents: "
Write-Host "-----------------"
cat $env:GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion Src/PowerShell/load-used-actions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function main() {
$fileName = "summarized-actions.json"
$jsonObject = ($summarizeActions | ConvertTo-Json -Depth 10)
New-Item -Path $fileName -Value $jsonObject -Force | Out-Null
Write-Host "Stored the summarized usage info into this file: [$fileName]"
Write-Host "Stored the summarized usage info into this file: [$fileName] in this directory: [$PWD]"

# upload the data into the marketplaceRepo
#Write-Host "Found [$($actionsFound.actions.Length)] actions in use!"
Expand Down

0 comments on commit dacb0ed

Please sign in to comment.