Read file contents. You can also get the file content in the branch
- name: Read README.md
id: package
uses: jaywcjlove/github-action-read-file@main
with:
path: package.json
- name: Echo package.json
run: echo "${{ steps.package.outputs.content }}"
Specify the branch to read the file content
- name: Read README.md(gh-pages)
id: ghpages
uses: jaywcjlove/github-action-read-file@main
with:
branch: gh-pages
path: README.md
- name: Echo README.md(gh-pages)
run: echo "${{ steps.ghpages.outputs.content }}"
path File path. E.g: src/index.tsbranch The branch where the file resides. Default: ${{ github.ref_name }}, E.g: main, gh-pageslocalfile Local File path. E.g: src/index.tscontent text file contenttypeencodingnamepathshasize file sizeurl Format: urigit_url Format: urihtml_url Format: uridownload_url Format: uritarget @example "actual/actual.md"submodule_git_url @example "git://example.com/defunkt/dotjs.git"package.json.Licensed under the MIT License.