Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guillaumefalourd/command-output-file-action
Github Action to generate an output file from a command execution (success or error) 📝
https://github.com/guillaumefalourd/command-output-file-action
all-os-supported cli command-line github-actions output-file test
Last synced: about 2 months ago
JSON representation
Github Action to generate an output file from a command execution (success or error) 📝
- Host: GitHub
- URL: https://github.com/guillaumefalourd/command-output-file-action
- Owner: GuillaumeFalourd
- License: apache-2.0
- Created: 2021-06-17T18:22:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-13T20:25:18.000Z (over 1 year ago)
- Last Synced: 2024-10-14T09:21:15.887Z (3 months ago)
- Topics: all-os-supported, cli, command-line, github-actions, output-file, test
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# command-output-file-action
[![Action test on Ubuntu](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/ubuntu_test_command_output.yml/badge.svg)](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/ubuntu_test_command_output.yml) [![Action test on MacOS](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/macos_test_command_output.yml/badge.svg)](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/macos_test_command_output.yml) [![Action test on Windows](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/windows_test_command_output.yml/badge.svg)](https://github.com/GuillaumeFalourd/command-output-file-action/actions/workflows/windows_test_command_output.yml)
![title](https://user-images.githubusercontent.com/22433243/122457400-fcde6c80-cf84-11eb-8ff3-65264e80c222.png)
Github Action to generate an output file from a command execution (success or error) 📝
* * *
## 📚 How to use this action?
The [`actions/checkout`](https://github.com/actions/checkout) is mandatory to use this action, as it will be necessary to access the repository files to get the output file after the action execution.
Field | Mandatory | Observation
------------ | ------------ | -------------
**command_line** | YES | ex: `ls -lha`
**output_file_name** | YES | ex: `output.txt`
**display_file_content** | NO | `YES` (default) or `NO`**⚠️ NOTES**:
- A **command line error won't break the workflow**, but just extract the output on the file.
- You can then access the **output file** in the directory **where you ran the action**.* * *
### 📝 Usage example
#### WITH output file display on workflow run
```yaml
steps:
- uses: actions/[email protected]
- uses: GuillaumeFalourd/[email protected]
with:
command_line: ls -lha
output_file_name: output.txt
display_file_content: YES # this is also the default value if not informed
```#### WITHOUT output file display on workflow run
```yaml
steps:
- uses: actions/[email protected]
- uses: GuillaumeFalourd/[email protected]
with:
command_line: ls -lha
output_file_name: output.txt
display_file_content: NO # YES is the default value if not informed
```## Licensed
This repository uses the [Apache License 2.0](https://github.com/GuillaumeFalourd/aws-cliaction/blob/main/LICENSE)