Skip to content

jaywcjlove/github-action-read-file

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

  • path File path. E.g: src/index.ts
  • branch The branch where the file resides. Default: ${{ github.ref_name }}, E.g: main, gh-pages
  • localfile Local File path. E.g: src/index.ts

Outputs

  • content text file content
  • type
  • encoding
  • name
  • path
  • sha
  • size file size
  • url Format: uri
  • git_url Format: uri
  • html_url Format: uri
  • download_url Format: uri
  • target @example "actual/actual.md"
  • submodule_git_url @example "git://example.com/defunkt/dotjs.git"

See Also

License

Licensed under the MIT License.

About

Read file contents.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy