Open samspencer5991 opened 2 years ago
As a workaround, specify
target: "./"
The issue is that target
is the full target file path. In the context of downloading multiple files, this option makes a bit less sense. Not all downloaded files can have the same target file path because they would collide.
There are 2 options.
target
to mean target directory, which would solve your problem but would be a backwards-incompatible change that needs to be released under a new major version.target: "./"
.@samspencer5991 what do you think?
I specified the target but still get the files renamed not sure if I'm doing something wrong
- name: download latest build
id: get_release
uses: dsaltares/fetch-gh-release-asset@1.0.0
with:
version: "latest"
file: "don-salmon-.*\\.zip"
regex: true
target: "./"
token: "${{ secrets.GITHUB_TOKEN }}"
I just hit the same issue - basically, the problem is that the combination of this line:
And this line:
Results in hilarity when the config is something like:
- uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
file: '.+\.(tar\.gz|whl)$'
regex: true
@Korkman's workaround of setting target
to ./
works because that prevents target
from being set to file
. Ideally that should just be the default behaviour.
I'm currently using this to download all available files from the repo in my GH action. The issue is that the downloaded files are then renamed with the passed file name with the original filename appended.
For example, in my repo I have four files, all beginning with 'bridge'. So I can download all of them by passing file: "bridge", but then my files end up looking like: "bridgebridge...."
Is there a way to avoid this and just keep the original file names?