Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igorskyflyer/action-readfile
๐ฌ๏ธ A GitHub Action to read an arbitrary file and either output it or use it in another GitHub Action. ๐
https://github.com/igorskyflyer/action-readfile
action back-end blob buffer filesystem fs github igorskyflyer javascript js read-file readfile text utility
Last synced: 25 days ago
JSON representation
๐ฌ๏ธ A GitHub Action to read an arbitrary file and either output it or use it in another GitHub Action. ๐
- Host: GitHub
- URL: https://github.com/igorskyflyer/action-readfile
- Owner: igorskyflyer
- License: mit
- Created: 2024-06-20T20:11:05.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-21T00:06:41.000Z (6 months ago)
- Last Synced: 2024-10-21T00:43:53.055Z (2 months ago)
- Topics: action, back-end, blob, buffer, filesystem, fs, github, igorskyflyer, javascript, js, read-file, readfile, text, utility
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/read-local-file
- Size: 242 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# readfile()
๐ฌ๏ธ A GitHub Action to read an arbitrary file and either output it or use it in another GitHub Action (*step*). ๐
๐ Support further development
I work hard for every project, including this one and your support means a lot to me!
Consider buying me a coffee. โ
Thank you for supporting my efforts! ๐๐
@igorskyflyer
## ๐คน๐ผโโ๏ธ Usage
In order to use this Action you need to create a YAML (`.yml`) file in your repository's `.github/workflows/` directory.
Here's an example.
`.github/workflows/read-file.yml`
```yaml
name: Read fileon:
[push]jobs:
read_file:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Read arbitrary filesteps:
# do not remove this step,
# it is necessary
- name: Checkout repository
uses: actions/checkout@v4
- name: Read arbitrary file
id: file
uses: igorskyflyer/[email protected]
with:
path: './test.txt'
- name: Output file
env:
FILE_CONTENTS: ${{ steps.file.outputs.content }}
# print the output directly (1)
# or via an environment variable (2)
run: |
echo 'File contents:'
echo "${{ steps.file.outputs.content }}"
echo "$FILE_CONTENTS"
```
## โ๏ธ Configuration
`path: string`, **required**
The path of the file to read, relative to the current working directory i.e. the repository where the Action is installed.
---
## ๐ชช License
Licensed under the MIT license which is available here, [MIT license](https://github.com/igorskyflyer/action-readfile/blob/main/LICENSE).
---
## ๐งฌ Related
[simple-exec](https://www.npmjs.com/package/simple-exec)
> _๐บ Command. Execution. Made. Simple. โถ_
[@igor.dvlpr/recursive-readdir](https://www.npmjs.com/package/@igor.dvlpr/recursive-readdir)
> _๐ Provides recursive readdir() and readdirSync() functions. ๐_
[@igor.dvlpr/keppo](https://www.npmjs.com/package/@igor.dvlpr/keppo)
> _๐ก Parse, manage, compare and output SemVer-compatible version numbers. ๐ก_
[@igor.dvlpr/odin](https://www.npmjs.com/package/@igor.dvlpr/odin)
> _๐ฑ Odin is an Object wrapper that allows you to create objects and set their attributes - all at once! ๐บ_
[@igor.dvlpr/aria](https://www.npmjs.com/package/@igor.dvlpr/aria)
> _๐งฌ Meet Aria, an efficient Adblock filter list compiler, with many features that make your maintenance of Adblock filter lists a breeze! ๐ก_