https://github.com/bfren/read-file
Reads any file from a repository for use in a GitHub action.
https://github.com/bfren/read-file
action
Last synced: about 2 months ago
JSON representation
Reads any file from a repository for use in a GitHub action.
- Host: GitHub
- URL: https://github.com/bfren/read-file
- Owner: bfren
- License: mit
- Created: 2021-09-24T07:40:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-18T09:10:44.000Z (6 months ago)
- Last Synced: 2026-03-28T13:42:16.414Z (3 months ago)
- Topics: action
- Language: Shell
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Read Any File
Read any file from a repository.
## Inputs
- `file`: the path to the file you want to read, relative to the repository root (default is ./VERSION)
## Outputs
- `contents`: the contents of the file
## Usage
```yml
jobs:
test:
runs-on: ubuntu-latest
name: Test read file action
steps:
-
name: Checkout code
uses: actions/checkout@v6
- name: Read file
uses: bfren/read-file@v2
id: read_file
with:
file: ./VERSION
- name: Echo file
run: echo "${{ steps.read_file.outputs.contents }}"
```
## Licence
> [MIT](https://mit.bfren.dev/2021)
## Copyright
> Copyright (c) 2021-2025 bfren
> Unless otherwise stated