https://github.com/cage1016/github-assets-cnb
A Cloud Native Buildpack that Download Github Assets
https://github.com/cage1016/github-assets-cnb
assets buildpack cnb github pack
Last synced: 2 months ago
JSON representation
A Cloud Native Buildpack that Download Github Assets
- Host: GitHub
- URL: https://github.com/cage1016/github-assets-cnb
- Owner: cage1016
- Created: 2021-04-20T09:09:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-24T02:21:12.000Z (over 4 years ago)
- Last Synced: 2025-05-06T15:19:17.224Z (5 months ago)
- Topics: assets, buildpack, cnb, github, pack
- Language: Shell
- Homepage: https://kaichu.io/posts/github-assets-cnb/
- Size: 5.39 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Github Asset Buildpack

A [Cloud Native Buildpack](https://buildpacks.io) that Download Github Assets
## Buildpack registry
https://registry.buildpacks.io/buildpacks/cage1016/github-assets-cnb
## Features
- Support Download Public/Private Github Assets
- `x-tar`, `gzip`, `x-zx`, `zip` auto unarchive## Usage
Support `metadata.githubassets` fields
- `repo`: Github Repo
- `asset`: Github Repo asset name
- `tag`: Release tag name, default set to "latest"
- `token_env`: (optional), Please assign ENV name for private repo
- `destination`: download asset destination path to, `bin/` for `application/x-executable` asset
- `strip_components`: `x-tar`, `gzip`, `x-zx` suuport StripComponents feature.1. Create `project.toml` if you want to embed github assets
```bash
cat <> project.toml
# assign token
[[build.env]]
name = "APITEST_TOOLCHAIN_TOKEN"
value = ""[[metadata.githubassets]]
repo = "kkdai/youtube"
asset = "youtubedr_2.7.0_linux_arm64.tar.gz"
destination = "bin"[[metadata.githubassets]]
repo = "qeek-dev/apitest-toolchain"
token_env = "APITEST_TOOLCHAIN_TOKEN"
asset = "apitest-toolchain-linux-amd64"
destination = "bin/apitest-toolchain"
tag = "v0.1.0"[[metadata.githubassets]]
repo = "stedolan/jq"
asset = "jq-linux64"
destination = "bin/jq"
EOF
```2. Build container image
```
pack build myapp --buildpack cage1016/github-assets-cnb@2.1.0
```3. Check `/layers/cage1016_github-assets-cnb`

### URI
```
urn:cnb:registry:cage1016/github-assets-cnb
```### Supported Stacks
- io.buildpacks.stacks.bionic
- io.paketo.stacks.tiny
- io.buildpacks.samples.stacks.bionic
- heroku-18
- heroku-20