bug: hashFiles with space-separated files is empty #285
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner#285
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reproducer (I put this file into the Forgejo repo locally):
Output:
Other issues with hashFiles: #54
This is causing issues for me with https://codeberg.org/forgejo/forgejo/pulls/5328 - I'm wondering if this was the root cause for the setup-go action to waste so much resources on the post step 🤔
hashFiles with multiple files is emptyto hashFiles with space-separated files is emptyMaking the arguments comma-separated works. I used the space-separated syntax, because I copied from https://github.com/actions/setup-go/issues/316#issuecomment-1632123279
For the record, I would suspect this issue is also present in upstream act. I could not find related changes and the testcases do not cover the syntax presented here
github.com/Bigpet/act@d6b2e9df78/pkg/runner/expression_test.go (L85)hashFiles with space-separated files is emptyto bug: hashFiles with space-separated files is emptyThe documentation should be updated to explain this in the entry documenting the
hashFilefunction https://forgejo.org/docs/v12.0/user/actions/#functions and a test added to end-to-end.- uses: actions/checkout@v4- name: hashFilesrun: |set -xhash="aea6ca2329c852f5b480ec35e1fe09d39a6bd1b50f4f9cc38fbd4fef870dc107"test "${{ hashFiles('.forgejo/fileone.txt') }}" = $hashtest "${{ hashFiles('.forgejo/fileone.*') }}" = $hashhttps://docs.github.com/en/actions/reference/workflows-and-actions/expressions#hashfiles does not suggest a whitespace separated list of files in a single argument is allowed. Only that multiple arguments can be provided, each for a file or pattern. Therefore I don't think it could be the reason why setup-go is taking long in the post step.
An update to the documentation to explain the
hashFilesfunction is proposed at https://codeberg.org/forgejo/docs/pulls/1492The documentation update was merged.