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
Getting artifact upload public URL in steps after upload #30
Comments
That should do the trick: steps:
- id: upload-file
name: Upload Artifact (json) to Google Cloud Storage
uses: google-github-actions/upload-cloud-storage@main
with:
path: file
destination: bucket/output
- name: Get public URL
run: echo "PUBLIC_URL=https://storage.googleapis.com/${{ steps.upload-file.outputs.uploaded }}" | sed 's|gs://||' >> $GITHUB_ENV
- name: Use URL for something
run: echo "${{ env.PUBLIC_URL }}" |
Hi @AaronMT does the workaround provided by @jakub-bacic (thanks!) work for you or were you looking for something else like a signed url? |
I haven't had a chance to try it yet, but that looks like what I was looking for albeit as a workaround. |
Was also looking for something like this. |
I am trying to achieve something similar, by copying artefacts from inside a docker container to the actual github runner on which the container run, and then try to upload these artefacts to google cloud. However, this works only if all tests in my suite pass, but if I have a failures then it gives the following error: google-github-actions/upload-cloud-storage failed with: ENOENT: no such file or directory, lstat '<path/to/test/report>' |
Hello,
In a GitHub Actions job, after
google-github-actions/upload-cloud-storage@main
step, I would like to get the public URL of the uploaded artifact from the previous step.The idea is a job using the following steps as an example:
How would you get the public URL of the artifact in a subsequent step?
The last command would give me a public URL to the uploaded artifact.
The text was updated successfully, but these errors were encountered: