-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do you set the Log URL based on output from a previous step? #1
Comments
Hey thanks @NullVoxPopuli for the first issue! I don't know much about some of the more complex parts of GitHub actions. I do believe you can set the "output" of a script (ie. setting a url) and then maybe pass it back in as a step variable? There is code for this in the toolkit: And then you could maybe include this by grabbing the output from the steps object. with:
url: ${{ steps.url }} There may be a better approach to this. |
@NullVoxPopuli I recently ran into this issue in my CI pipeline using the zeit now CLI to deploy my frontend. My workaround was to set my environment variable as an output from my run step in my job as follows: - name: Export URLs to environment variables
id: url
run: |
FRONTEND_URL=mysite.com # replace this with your jq command
echo ::set-output name=frontend_url::${FRONTEND_URL} then you can use it in the deliverybot action as follows (untested!): - name: 'deployment success'
if: success()
uses: 'deliverybot/deployment-status@master'
with:
log-url: ${{ steps.url.outputs.frontend_url }}
state: 'success'
token: '${{ github.token }}' note that the |
@chrnorm thanks for this, this is a super useful tip for GitHub actions. |
I have dynamic subdomains / deploys with netlify, and I can get the URL from the deploy output via
jq
. So, in the previous step, I have an environment variable that has the deploy URL. But... I don't know how to get it into the next step.The text was updated successfully, but these errors were encountered: