Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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. ๐Ÿƒ

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! ๐Ÿ™๐Ÿ˜Š





Donate to igorskyflyer




@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 file

on:
[push]

jobs:
read_file:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Read arbitrary file

steps:
# 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! ๐Ÿ—ก_