github
A github
asset is created from files downloaded from either a public or a linked Github repo.
Required Parameters
dest
- Destination directorypath
- Path in repo from which to pull file or directoryrepo
- The GitHub repository to pull from, formated asowner
/repo
e.g.replicatedhq/ship
source
- One ofpublic
orprivate
, ifprivate
, access to the repo can be validated on release creation
Optional Parameters
mode
- If present, overrides the file mode of all files included by this asset.ref
- Reference to a github commit to pull, usually a SHA or a tag – usage of branches is supported but discouraged as content could change within a single Ship releasestrip_path
- If true, the github directory will not be included in the filepath of the generated files. For instance, when outputting all files within ‘source/’ in the repository to the ‘dest/’ directory, the file ‘source/a/file.txt’ would be placed at ‘dest/source/a/file.txt’ when this is false and ‘dest/a/file.txt’ when this is true.when
- This asset will be included when ‘when’ is omitted or true
Examples
assets:
v1:
- github:
repo: github.com/replicatedhq/superbigtool-k8s
ref: 8fcaebe55af67fe6789fa678faaa76fa867fbc
path: k8s-yamls/
dest: ./k8s/
source: private
strip_path: ''
assets:
v1:
- github:
repo: github.com/replicatedhq/ship
ref: master
path: hack/docs/
dest: './docs{{repl Add 1 1}}/'
source: public
mode: 644
strip_path: '{{repl ParseBool "true"}}'