-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When attempting to use hashFiles on a file created within a step the output is an empty string.
To Reproduce
name: ci
on: push
jobs:
cache-key:
runs-on: ubuntu-latest
steps:
- id: cache-key
name: Build cache key
run: |
echo "Printing GITHUB_WORKSPACE..."
echo $GITHUB_WORKSPACE
echo "Creating CACHEKEY file..."
echo "1.13.4+24.3.4" > CACHEKEY
echo "Printing directory contents..."
ls
echo "Printing contents of CACHEKEY..."
cat CACHEKEY
echo "Printing output of hashFiles('CACHEKEY')..."
echo "${{ hashFiles('CACHEKEY') }}"Expected behavior
The output of hashFiles should either be a hash of the file, a warning describing why it couldn't hash the file or an error describing why it couldn't hash the file.
Runner Version and Platform
Version of your runner? 2.291.1
OS of the machine running the runner? OSX/Windows/Linux/... Ubuntu 20.04.4
What's not working?
hashFiles is not creating a hash for a file created within the step.
Job Log Output
2022-05-08T12:49:55.7486101Z Requested labels: ubuntu-latest
2022-05-08T12:49:55.7486151Z Job defined at: heypigeonhq/platform/.github/workflows/ci.yaml@refs/heads/debug/cachekey
2022-05-08T12:49:55.7486171Z Waiting for a runner to pick up this job...
2022-05-08T12:49:56.4249802Z Job is waiting for a hosted runner to come online.
2022-05-08T12:50:00.3471884Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-05-08T12:50:04.8807274Z ##[debug]Starting: cache-key
2022-05-08T12:50:04.8834048Z ##[debug]Cleaning runner temp folder: /home/runner/work/_temp
2022-05-08T12:50:04.9185021Z ##[debug]Starting: Set up job
2022-05-08T12:50:04.9185515Z Current runner version: '2.291.1'
2022-05-08T12:50:04.9210937Z ##[group]Operating System
2022-05-08T12:50:04.9211499Z Ubuntu
2022-05-08T12:50:04.9211950Z 20.04.4
2022-05-08T12:50:04.9212254Z LTS
2022-05-08T12:50:04.9212614Z ##[endgroup]
2022-05-08T12:50:04.9213016Z ##[group]Virtual Environment
2022-05-08T12:50:04.9213416Z Environment: ubuntu-20.04
2022-05-08T12:50:04.9213878Z Version: 20220503.1
2022-05-08T12:50:04.9214538Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220503.1/images/linux/Ubuntu2004-Readme.md
2022-05-08T12:50:04.9215296Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220503.1
2022-05-08T12:50:04.9215850Z ##[endgroup]
2022-05-08T12:50:04.9216317Z ##[group]Virtual Environment Provisioner
2022-05-08T12:50:04.9216903Z 1.0.0.0-main-20220421-1
2022-05-08T12:50:04.9217289Z ##[endgroup]
2022-05-08T12:50:04.9218082Z ##[group]GITHUB_TOKEN Permissions
2022-05-08T12:50:04.9218741Z Contents: read
2022-05-08T12:50:04.9219243Z Metadata: read
2022-05-08T12:50:04.9219598Z ##[endgroup]
2022-05-08T12:50:04.9223341Z Secret source: Actions
2022-05-08T12:50:04.9224092Z ##[debug]Primary repository: heypigeonhq/platform
2022-05-08T12:50:04.9224581Z Prepare workflow directory
2022-05-08T12:50:04.9311643Z ##[debug]Creating pipeline directory: '/home/runner/work/platform'
2022-05-08T12:50:04.9314410Z ##[debug]Creating workspace directory: '/home/runner/work/platform/platform'
2022-05-08T12:50:04.9315472Z ##[debug]Update context data
2022-05-08T12:50:04.9318467Z ##[debug]Evaluating job-level environment variables
2022-05-08T12:50:05.0087035Z ##[debug]Evaluating job container
2022-05-08T12:50:05.0090185Z ##[debug]Evaluating job service containers
2022-05-08T12:50:05.0092745Z ##[debug]Evaluating job defaults
2022-05-08T12:50:05.0173900Z Prepare all required actions
2022-05-08T12:50:05.0483352Z ##[debug]Set step 'cache-key' display name to: 'Build cache key'
2022-05-08T12:50:05.0490916Z ##[debug]Collect running processes for tracking orphan processes.
2022-05-08T12:50:05.0762624Z ##[debug]Finishing: Set up job
2022-05-08T12:50:05.0996649Z ##[debug]Evaluating condition for step: 'Build cache key'
2022-05-08T12:50:05.1172945Z ##[debug]Evaluating: success()
2022-05-08T12:50:05.1179889Z ##[debug]Evaluating success:
2022-05-08T12:50:05.1215142Z ##[debug]=> true
2022-05-08T12:50:05.1224419Z ##[debug]Result: true
2022-05-08T12:50:05.1272427Z ##[debug]Starting: Build cache key
2022-05-08T12:50:05.1610524Z ##[debug]Loading inputs
2022-05-08T12:50:05.1665326Z ##[debug]Evaluating: format('echo "Printing GITHUB_WORKSPACE..."
2022-05-08T12:50:05.1665796Z ##[debug]echo $GITHUB_WORKSPACE
2022-05-08T12:50:05.1666356Z ##[debug]
2022-05-08T12:50:05.1666764Z ##[debug]echo "Creating CACHEKEY file..."
2022-05-08T12:50:05.1667240Z ##[debug]echo "1.13.4+24.3.4" > CACHEKEY
2022-05-08T12:50:05.1667632Z ##[debug]
2022-05-08T12:50:05.1668039Z ##[debug]echo "Printing directory contents..."
2022-05-08T12:50:05.1668409Z ##[debug]ls
2022-05-08T12:50:05.1668736Z ##[debug]
2022-05-08T12:50:05.1669254Z ##[debug]echo "Printing contents of CACHEKEY..."
2022-05-08T12:50:05.1669631Z ##[debug]cat CACHEKEY
2022-05-08T12:50:05.1670241Z ##[debug]
2022-05-08T12:50:05.1670695Z ##[debug]echo "Printing output of hashFiles(''CACHEKEY'')..."
2022-05-08T12:50:05.1671159Z ##[debug]echo "{0}"
2022-05-08T12:50:05.1671611Z ##[debug]', hashFiles('CACHEKEY'))
2022-05-08T12:50:05.1673009Z ##[debug]Evaluating format:
2022-05-08T12:50:05.1693257Z ##[debug]..Evaluating String:
2022-05-08T12:50:05.1694663Z ##[debug]..=> 'echo "Printing GITHUB_WORKSPACE..."
2022-05-08T12:50:05.1695114Z ##[debug]echo $GITHUB_WORKSPACE
2022-05-08T12:50:05.1695540Z ##[debug]
2022-05-08T12:50:05.1695956Z ##[debug]echo "Creating CACHEKEY file..."
2022-05-08T12:50:05.1696406Z ##[debug]echo "1.13.4+24.3.4" > CACHEKEY
2022-05-08T12:50:05.1697055Z ##[debug]
2022-05-08T12:50:05.1697515Z ##[debug]echo "Printing directory contents..."
2022-05-08T12:50:05.1697955Z ##[debug]ls
2022-05-08T12:50:05.1698272Z ##[debug]
2022-05-08T12:50:05.1698713Z ##[debug]echo "Printing contents of CACHEKEY..."
2022-05-08T12:50:05.1699212Z ##[debug]cat CACHEKEY
2022-05-08T12:50:05.1699546Z ##[debug]
2022-05-08T12:50:05.1700003Z ##[debug]echo "Printing output of hashFiles(''CACHEKEY'')..."
2022-05-08T12:50:05.1700477Z ##[debug]echo "{0}"
2022-05-08T12:50:05.1700814Z ##[debug]'
2022-05-08T12:50:05.1732296Z ##[debug]..Evaluating hashFiles:
2022-05-08T12:50:05.1772163Z ##[debug]....Evaluating String:
2022-05-08T12:50:05.1772657Z ##[debug]....=> 'CACHEKEY'
2022-05-08T12:50:05.1773595Z ##[debug]Search root directory: '/home/runner/work/platform/platform'
2022-05-08T12:50:05.1774404Z ##[debug]Search pattern: 'CACHEKEY'
2022-05-08T12:50:05.1918031Z ##[debug]Starting process:
2022-05-08T12:50:05.1918626Z ##[debug] File name: '/home/runner/runners/2.291.1/externals/node16/bin/node'
2022-05-08T12:50:05.1919262Z ##[debug] Arguments: '"/home/runner/runners/2.291.1/bin/hashFiles"'
2022-05-08T12:50:05.1919930Z ##[debug] Working directory: '/home/runner/work/platform/platform'
2022-05-08T12:50:05.1920632Z ##[debug] Require exit code zero: 'False'
2022-05-08T12:50:05.1930893Z ##[debug] Encoding web name: ; code page: ''
2022-05-08T12:50:05.1931479Z ##[debug] Force kill process on cancellation: 'False'
2022-05-08T12:50:05.1932127Z ##[debug] Redirected STDIN: 'False'
2022-05-08T12:50:05.1932667Z ##[debug] Persist current code page: 'False'
2022-05-08T12:50:05.1933143Z ##[debug] Keep redirected STDIN open: 'False'
2022-05-08T12:50:05.1933663Z ##[debug] High priority process: 'False'
2022-05-08T12:50:05.1985688Z ##[debug]Updated oom_score_adj to 500 for PID: 1514.
2022-05-08T12:50:05.1998387Z ##[debug]Process started with process id 1514, waiting for process exit.
2022-05-08T12:50:05.3695247Z ##[debug]Match Pattern: CACHEKEY
2022-05-08T12:50:05.3695949Z ##[debug]::debug::followSymbolicLinks 'false'
2022-05-08T12:50:05.3712857Z ##[debug]::debug::followSymbolicLinks 'false'
2022-05-08T12:50:05.3713464Z ##[debug]::debug::implicitDescendants 'true'
2022-05-08T12:50:05.3714080Z ##[debug]::debug::omitBrokenSymbolicLinks 'true'
2022-05-08T12:50:05.3722134Z ##[debug]::debug::Search path '/home/runner/work/platform/platform/CACHEKEY'
2022-05-08T12:50:05.3751163Z ##[debug]Hash result: ''
2022-05-08T12:50:05.3752121Z ##[debug]undefined
2022-05-08T12:50:05.3813377Z ##[debug]STDOUT/STDERR stream read finished.
2022-05-08T12:50:05.3827140Z ##[debug]STDOUT/STDERR stream read finished.
2022-05-08T12:50:05.3829101Z ##[debug]Finished process 1514 with exit code 0, and elapsed time 00:00:00.1889946.
2022-05-08T12:50:05.3831324Z ##[debug]..=> ''
2022-05-08T12:50:05.3833479Z ##[debug]=> 'echo "Printing GITHUB_WORKSPACE..."
2022-05-08T12:50:05.3834283Z ##[debug]echo $GITHUB_WORKSPACE
2022-05-08T12:50:05.3834698Z ##[debug]
2022-05-08T12:50:05.3835258Z ##[debug]echo "Creating CACHEKEY file..."
2022-05-08T12:50:05.3835690Z ##[debug]echo "1.13.4+24.3.4" > CACHEKEY
2022-05-08T12:50:05.3836080Z ##[debug]
2022-05-08T12:50:05.3836517Z ##[debug]echo "Printing directory contents..."
2022-05-08T12:50:05.3836895Z ##[debug]ls
2022-05-08T12:50:05.3837279Z ##[debug]
2022-05-08T12:50:05.3837714Z ##[debug]echo "Printing contents of CACHEKEY..."
2022-05-08T12:50:05.3838108Z ##[debug]cat CACHEKEY
2022-05-08T12:50:05.3838636Z ##[debug]
2022-05-08T12:50:05.3839121Z ##[debug]echo "Printing output of hashFiles(''CACHEKEY'')..."
2022-05-08T12:50:05.3839666Z ##[debug]echo ""
2022-05-08T12:50:05.3840285Z ##[debug]'
2022-05-08T12:50:05.3841038Z ##[debug]Result: 'echo "Printing GITHUB_WORKSPACE..."
2022-05-08T12:50:05.3841590Z ##[debug]echo $GITHUB_WORKSPACE
2022-05-08T12:50:05.3842114Z ##[debug]
2022-05-08T12:50:05.3842619Z ##[debug]echo "Creating CACHEKEY file..."
2022-05-08T12:50:05.3843065Z ##[debug]echo "1.13.4+24.3.4" > CACHEKEY
2022-05-08T12:50:05.3843477Z ##[debug]
2022-05-08T12:50:05.3843931Z ##[debug]echo "Printing directory contents..."
2022-05-08T12:50:05.3844621Z ##[debug]ls
2022-05-08T12:50:05.3845007Z ##[debug]
2022-05-08T12:50:05.3845464Z ##[debug]echo "Printing contents of CACHEKEY..."
2022-05-08T12:50:05.3845894Z ##[debug]cat CACHEKEY
2022-05-08T12:50:05.3846285Z ##[debug]
2022-05-08T12:50:05.3846934Z ##[debug]echo "Printing output of hashFiles(''CACHEKEY'')..."
2022-05-08T12:50:05.3847347Z ##[debug]echo ""
2022-05-08T12:50:05.3847687Z ##[debug]'
2022-05-08T12:50:05.3857903Z ##[debug]Loading env
2022-05-08T12:50:05.3980227Z ##[group]Run echo "Printing GITHUB_WORKSPACE..."
2022-05-08T12:50:05.3980812Z �[36;1mecho "Printing GITHUB_WORKSPACE..."�[0m
2022-05-08T12:50:05.3981307Z �[36;1mecho $GITHUB_WORKSPACE�[0m
2022-05-08T12:50:05.3981736Z �[36;1m�[0m
2022-05-08T12:50:05.3982248Z �[36;1mecho "Creating CACHEKEY file..."�[0m
2022-05-08T12:50:05.3982656Z �[36;1mecho "1.13.4+24.3.4" > CACHEKEY�[0m
2022-05-08T12:50:05.3983038Z �[36;1m�[0m
2022-05-08T12:50:05.3983739Z �[36;1mecho "Printing directory contents..."�[0m
2022-05-08T12:50:05.3984138Z �[36;1mls�[0m
2022-05-08T12:50:05.3984524Z �[36;1m�[0m
2022-05-08T12:50:05.3984951Z �[36;1mecho "Printing contents of CACHEKEY..."�[0m
2022-05-08T12:50:05.3985351Z �[36;1mcat CACHEKEY�[0m
2022-05-08T12:50:05.3985731Z �[36;1m�[0m
2022-05-08T12:50:05.3986980Z �[36;1mecho "Printing output of hashFiles('CACHEKEY')..."�[0m
2022-05-08T12:50:05.3987694Z �[36;1mecho ""�[0m
2022-05-08T12:50:05.4975429Z shell: /usr/bin/bash -e {0}
2022-05-08T12:50:05.4975973Z ##[endgroup]
2022-05-08T12:50:05.5157352Z ##[debug]/usr/bin/bash -e /home/runner/work/_temp/df235fb7-6507-4a15-bf3f-8cdd2b51adfb.sh
2022-05-08T12:50:05.5297103Z Printing GITHUB_WORKSPACE...
2022-05-08T12:50:05.5297639Z /home/runner/work/platform/platform
2022-05-08T12:50:05.5298027Z Creating CACHEKEY file...
2022-05-08T12:50:05.5298415Z Printing directory contents...
2022-05-08T12:50:05.5298763Z CACHEKEY
2022-05-08T12:50:05.5299091Z Printing contents of CACHEKEY...
2022-05-08T12:50:05.5299436Z 1.13.4+24.3.4
2022-05-08T12:50:05.5300089Z Printing output of hashFiles('CACHEKEY')...
2022-05-08T12:50:05.5300386Z
2022-05-08T12:50:05.5444162Z ##[debug]Finishing: Build cache key
2022-05-08T12:50:05.5594316Z ##[debug]Starting: Complete job
2022-05-08T12:50:05.5596209Z Cleaning up orphan processes
2022-05-08T12:50:05.5993357Z ##[debug]Finishing: Complete job
2022-05-08T12:50:05.6136940Z ##[debug]Finishing: cache-key
Runner and Worker's Diagnostic Logs
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working