Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zcong1993/setup-bin
https://github.com/zcong1993/setup-bin
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/zcong1993/setup-bin
- Owner: zcong1993
- License: mit
- Created: 2020-12-09T05:39:06.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T09:28:16.000Z (about 1 year ago)
- Last Synced: 2024-10-15T07:02:21.102Z (24 days ago)
- Language: TypeScript
- Homepage:
- Size: 2.15 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup bin
> curl {url} && untar && add to path for github actions with cache
## Usage
now support `.7z`, `.zip` and `tar`
### common options
| option | required | description |
| -------- | -------- | -------------------------------------------------------- |
| name | true | Name present the binary |
| bin-path | false | Binary file relative path, default ./ |
| test-cmd | false | Use for test if binary install success, eg: hugo version |### Direct mode
pass `download-url` directly.
The action will download asset from the given url and unzip it directly.
| option | required | description |
| ------------ | -------- | ---------------------------- |
| bin-version | true | Binary version as cache key |
| download-url | true | Binary resource download url |```yaml
- uses: zcong1993/setup-bin@master
with:
download-url: https://github.com/zcong1993/changed-files/releases/download/v0.1.2/changed-files_0.1.2_linux_amd64.tar.gz
name: changed-files
bin-version: '0.1.2'
test-cmd: changed-files -v
```### Github Release mode
get github release by passing `repo-full` and `tag-version`, then find asset by `matcher` regexp.
| option | required | description |
| ----------- | -------- | --------------------------------------------------------------------------- |
| repo-full | true | Download github release, owner/repo, eg: gohugoio/hugo |
| tag-version | true | Github release tag name or latest |
| matcher | true | Regex use for detect which asset should download, eg: "Linux-64bit.tar.gz$" |```yaml
- name: test github release
uses: zcong1993/setup-bin@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: hugo-861
repo-full: gohugoio/hugo
tag-version: v0.86.1
matcher: Linux-64bit.tar.gz$
test-cmd: hugo version
- name: test github release latest
uses: zcong1993/setup-bin@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: hugo
repo-full: gohugoio/hugo
tag-version: latest
matcher: Linux-64bit.tar.gz$
test-cmd: hugo version
```## License
MIT © zcong1993