Cookbooks
github
documentation
Asset

Back to resource list

github_asset

Downloads an asset from a Github repository

Actions

ActionDescription
:downloadDownloads an asset from a Github repository
:extractDownloads and extracts an asset from a Github repository
:deleteDeletes a local asset from a Github repository

Properties

NameTypeDefaultDescription
fileStringResource nameFile name of the asset
releaseStringRelease name of the asset (required)
repoStringRepository org and name
github_userStringGithub user for authentication
github_tokenStringGithub token for authentication
ownerStringOwner for extracted archive
groupStringGroup for extracted archive
forcetrue, falsefalseForce downloading and extracting archive
extract_toStringPath to extract asset to

Examples

github_asset 'Precompiled.zip' do
  repo 'elixir-lang/elixir'
  release 'v1.12.2'
end
 
github_asset 'Precompiled.zip' do
  repo 'elixir-lang/elixir'
  release 'v1.12.2'
  action :delete
end
 
github_asset 'Precompiled.zip' do
  repo 'elixir-lang/elixir'
  release 'v1.12.2'
  extract_to '/opt/elixir'
  action :extract
end