Comments (5)
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 }}"
from upload-cloud-storage.
Hi @AaronMT does the workaround provided by @jakub-bacic (thanks!) work for you or were you looking for something else like a signed url?
from upload-cloud-storage.
I haven't had a chance to try it yet, but that looks like what I was looking for albeit as a workaround.
from upload-cloud-storage.
Was also looking for something like this.
The workaround works for me, apart from some minor details, particularly because I'm uploading a single file - otherwise it would involve iterating through the CSV list of files returned by ${{ steps.upload-file.outputs.uploaded }}
.
Also, might be worth noting that the pipe to sed 's|gs://||'
doesn't seem to be relevant anymore as the prefix and bucket are no longer returned. Since the bucket is not returned, that needs to be added when creating either the download link or the GS URI.
from upload-cloud-storage.
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>'
from upload-cloud-storage.
Related Issues (20)
- Looks like 0.10.4 hasn't been released. HOT 3
- Cache based on Checksum HOT 3
- How to Copy Files/Folder from Github Action to Google Cloud Storage (Bucket) HOT 1
- How to Copy Files/Folder from Github Action to Google Cloud Storage (Bucket)
- Upload fails with: triggerUncaughtException(err, true /* fromPromise */); HOT 5
- Action does not allow uploading single file to a bucket path HOT 1
- Annotation warnings: Unexpected input(s) HOT 1
- gha-creds file getting pushed to the storage HOT 11
- New release with at least @google-cloud/storage 6.9.5
- Error: google-github-actions/upload-cloud-storage failed with: invalid response body while trying to fetch https://sts.googleapis.com/v1/token: read ECONNRESET HOT 5
- "headers: Cache-Control" causes an error HOT 1
- Error during upload: the offset is lower than the number of bytes written. HOT 4
- Support action issues a warning instead of fail when no file exist in the given path HOT 1
- Allow passing gcloudignore path
- Glob does not work correctly HOT 13
- Action does not handle inverted folders well HOT 1
- Rename a file when copying
- Deleting file or folder
- Google API permissions error when using GKE runners HOT 6
- support no-clobber copying HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upload-cloud-storage.