Skip to content
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

"uploading a file" example in README seems wrong #353

Closed
exoego opened this issue Feb 6, 2024 · 2 comments · Fixed by #356
Closed

"uploading a file" example in README seems wrong #353

exoego opened this issue Feb 6, 2024 · 2 comments · Fixed by #356
Labels
bug Something isn't working

Comments

@exoego
Copy link

exoego commented Feb 6, 2024

TL;DR

I've followed the "uploading a file" example but the file was uploaded to bucket-name/file-name/file-name.
This example:

- id: 'upload-file'
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: '/path/to/file'
destination: 'bucket-name/file'

Expected behavior

The file build/native/nativeCompile/my-app.exe is uploaded to
my-bucket/my-app.exe

Observed behavior

The file build/native/nativeCompile/my-app.exe was uploaded to
my-bucket/my-app.exe/my-app.exe

Action YAML

name: build
on:
  push:
    branches: [master]
  workflow_dispatch:

jobs:
  build-windows-native-image:
    permissions:
      contents: 'read'
      id-token: 'write'
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v4
      - uses: graalvm/setup-graalvm@v1
        with:
          java-version: '17'
          distribution: 'graalvm-community'
          components: 'native-image'
          native-image-job-reports: 'true'
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Build native image
        uses: gradle/actions/setup-gradle@v3
        with:
          arguments: nativeCompile
      - uses: google-github-actions/auth@v2
        name: Login to GCP
        with:
          workload_identity_provider: "projects/***/locations/global/workloadIdentityPools/***/providers/***"
          service_account: "***@***.iam.gserviceaccount.com"
          token_format: access_token
      - uses: google-github-actions/upload-cloud-storage@v2
        name: Upload to Cloud Storage
        with:
          path: 'build/native/nativeCompile/my-app.exe'
          destination: 'my-bucket/my-app.exe'

Log output

No response

Additional information

  • Windows runner is used
@exoego exoego added the bug Something isn't working label Feb 6, 2024
@sethvargo
Copy link
Member

Hi there - could you please provide the debug output for the complete GitHub Actions workflow run?

@rtibbles
Copy link

rtibbles commented Apr 9, 2024

I had a similar experience when following the instructions from the README. The log for the action step is first the inputs:

Run google-github-actions/upload-cloud-storage@v2
  with:
    path: dist/kolibri-0.16.0-py.py3-none-any.whl
    destination: ***/downloads/kolibri/v0.16.0/kolibri-0.16.0-py2.py-none-any.whl
    gzip: true
    resumable: true
    parent: true
    concurrency: 100
    process_gcloudignore: true

Then the actual upload, you can see puts the filename in a folder called the filename. I am guessing that actually specifying the filename in this way isn't supported, or requires a different argument? Either way, that's not what the README shows.

Upload files
  Uploading /home/runner/work/kolibri/kolibri/dist/kolibri-0.16.0-py2.py3-none-any.whl to gs://***/downloads/kolibri/v0.16.0/kolibri-0.16.0-py2.py3-none-any.whl/kolibri-0.16.0-py2.py3-none-any.whl

sethvargo added a commit that referenced this issue Apr 11, 2024
Fixes #353

Signed-off-by: Seth Vargo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

3 participants