jaywcjlove / github-action-read-file

Read file contents.
https://jaywcjlove.github.io/github-action-read-file
MIT License
7 stars 1 forks source link

Read File Content

Buy me a coffee test

Read file contents. You can also get the file content in the branch

Example Usage

- 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 }}"

Inputs

Outputs

See Also

License

Licensed under the MIT License.