logo
2
1
WeChat Login
Revert "feat: 文件路径支持文件夹和通配符"

fetch-git-file

Retrieve CNB git files to local

Parameters

token

  • type: String
  • required: No
  • default: CNB_TOKEN

Token required for calling CNB open API

Needs file management read permission repo-contents:r

Default is the CNB_TOKEN in environment variables

slug

  • type: String
  • required: Yes

Repository path

ref

  • type: String
  • required: Yes

Repository branch, tag, or SHA

files

  • type: String
  • required: Yes

List of files to be retrieved

Multi-line text, one path per line, such as:

a/b/c.txt d/e.ts f.yml

target

  • type: String
  • required: Yes
  • default: _tmp_

Directory for storing files

For repository root directory, fill in .

Usage in Cloud Native Build

main: push: - stages: - name: fetch-git-file image: cnbcool/fetch-git-file settings: slug: xx/xx ref: master files: | a/b/c.txt d/e.ts f.yml