mathiasvr / command-output Goto Github PK
View Code? Open in Web Editor NEWGitHub action that runs a command and store its output
License: MIT License
GitHub action that runs a command and store its output
License: MIT License
I used this action in a recent workflow and it generated a warning:
Warning: The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Node 16 is deprecated. See https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
Hi, I forked your action to extend it with timeout on no output functionality. This is to provide a way to kill a step when the process hangs, goes into a deadlock etc. The timeout built in in GHA is relative to the start of step execution and I want a timeout relative to last activity. This is useful in long running steps. Let me know if you think it fits your idea for the action and if so I will be happy to open a PR
Hello, I'm outputting a large block of JSON text and some of the values seem to be interpreted as sensitive info and as a result, are being obfuscated. Is there a way to disable obfuscation and output the raw values?
"startTime": "2023-08-16T14:38:3***.862Z",
"line": 12***,
when run with working-directory produce error. Working-directory is not supported.
Ex:
- name: MyStep
uses: mathiasvr/command-output@v1
with:
working-directory: someDir
run: echo "Should work"
produce: Warning: Unexpected input(s) 'working-directory', valid inputs are ['run', 'shell']
If a command outputs something like:
(stdout) Running test: foo
(stderr) test failed
(stdout) Running test: bar
The outputs are:
stdout
Running test: foo
Running test: bar
stderr
test failed
And you wouldn't know which test failed. Would it be possible to have a second output output
that contains both stdout and stderr, in the correct order?
Thanks!
Just noticed that this runs 'using: node12' which is only maintained until the end of this month (April 2022): https://nodejs.org/en/about/releases/
This might require updating some of the dependencies, e.g.
command-output/package-lock.json
Line 980 in 47cf7af
Thank you for creating this action, I'm using it right now in a workflow and it works great.
Perhaps a useful feature would be the ability to pass a regular expression that captures only a part of stdout
/ stderr
into a third variable. For example, see my code below where I'm using two steps to accomplish this (workflow file here). It's not that bad, but it seems like there should be a better way.
- name: Create preview channel
uses: mathiasvr/[email protected]
id: create_preview
with:
run: firebase hosting:channel:create ${{ github.event.pull_request.number }}
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# Output should look like this:
#
# + hosting:channel: Channel <pr_number> has been created on site <project_id>.
# + hosting:channel: Channel <pr_number> will expire at <timestamp>.
# + hosting:channel: Channel URL: https://<project_id>--<pr_number>-<random_hash>.web.app
#
# To deploy to this channel, use firebase hosting:channel:deploy <pr_number>.
- name: Get preview channel URL from stdout
uses: mathiasvr/[email protected]
id: preview_url
with:
run: echo '${{ steps.create_preview.outputs.stdout }}' | perl -ne 'print "$1\n" if /(https:\/\/[^\s]+\.web\.app)/'
# Output: https://<project_id>--<pr_number>-<random_hash>.web.app
Hello!
I hope you are doing well!
We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.
Can you enable it, so that we can report it?
Thanks in advance!
PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.