Skip to content

Commit 9518103

Browse files
authored
Change option for downloading all assets to fileName with "*" (#291)
* Change option for downloading all assets to fileName with "*" Add test on CI to download filew from private repo * Update CI workflow
1 parent 1ffde54 commit 9518103

File tree

5 files changed

+178
-48
lines changed

5 files changed

+178
-48
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@ jobs:
3535
repository: "eloots/course-management-tools"
3636
tag: "1.0.0"
3737
fileName: "course-management-tools.zip"
38-
out-file-path: "."
39-
40-
- run: |
41-
unzip course-management-tools.zip
38+
out-file-path: "./cmt"
4239

43-
- name: List working directory
44-
run: ls -lrth
40+
- name: List downloaded files
41+
run: ls -lrth cmt
42+
43+
- name: Test download from a private repo
44+
uses: ./
45+
with:
46+
repository: "robinraju/release-downloader-test"
47+
latest: true
48+
fileName: "*"
49+
tarBall: true
50+
zipBall: true
51+
token: ${{ secrets.RELEASE_DOWNLOADER_TEST_TOKEN }}
52+
out-file-path: "./downloader-test"
53+
54+
- name: List downloaded files from private repo
55+
run: ls -lrth downloader-test

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ A Github Action to download assets from github release. It can download specifie
2525

2626
# The name of the file to download.
2727
# Use this field only to specify filenames other than tarball or zipball, if any.
28+
# Use '*' to download all assets
2829
fileName: ""
2930

3031
# Download the attached tarball (*.tar.gz)
@@ -92,3 +93,13 @@ A Github Action to download assets from github release. It can download specifie
9293
tarBall: true
9394
zipBall: true
9495
```
96+
97+
### Download all assets if more than one files are available
98+
99+
```yaml
100+
- uses: robinraju/[email protected]
101+
with:
102+
repository: "user/repo"
103+
latest: true
104+
fileName: "*"
105+
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
default: ""
1616
required: false
1717
fileName:
18-
description: "Name of the file to download (if empty it will download all assets)"
18+
description: "Name of the file to download (use '*' to download all assets other than tarball or zipball)"
1919
default: ""
2020
required: false
2121
tarBall:

0 commit comments

Comments
 (0)