Git Product home page Git Product logo

Comments (5)

jakub-bacic avatar jakub-bacic commented on June 15, 2024

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.

bharathkkb avatar bharathkkb commented on June 15, 2024

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.

AaronMT avatar AaronMT commented on June 15, 2024

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.

RuiGamitoFRVR avatar RuiGamitoFRVR commented on June 15, 2024

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.

dragos-panzaru-md avatar dragos-panzaru-md commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.