0
5
Login
Code
Issues
Pull requests
Events
Packages
65431646d8404ebfd055fc435e9f83a98974c584
65431646d8404ebfd055fc435e9f83a98974c584

fetch-git-file

Fetch CNB git files to local

Parameters

token

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

Token required for accessing CNB open API

Requires read permission for file management repo-contents:r

Defaults to the environment variable CNB_TOKEN

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 fetch

Multiple lines of text, with one path per line, for example:

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

target

  • type: String
  • required: Yes
  • default: tmp

Directory to store the files

Use . for the repository root directory

Usage in Cloud Native Builds

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