Github Action to generate an output file from a command execution (success or error) π
The 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 |
- 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.
steps:
- uses: actions/checkout@v2.3.4
- uses: GuillaumeFalourd/command-output-file-action@v1.1
with:
command_line: ls -lha
output_file_name: output.txt
display_file_content: YES # this is also the default value if not informed
steps:
- uses: actions/checkout@v2.3.4
- uses: GuillaumeFalourd/command-output-file-action@v1.1
with:
command_line: ls -lha
output_file_name: output.txt
display_file_content: NO # YES is the default value if not informed
This repository uses the Apache License 2.0