google-github-actions / upload-cloud-storage

A GitHub Action for uploading files to a Google Cloud Storage (GCS) bucket.
https://cloud.google.com/storage
Apache License 2.0
206 stars 49 forks source link

Annotation warnings: Unexpected input(s) #310

Closed joci-tildeloop closed 1 year ago

joci-tildeloop commented 1 year ago

TL;DR

Two of the steps in our jobs that are using upload-cloud-storage are throwing warnings:

Unexpected input(s) 'path', 'parent', 'destination', 'predefinedAcl', valid inputs are ['project_id', 'workload_identity_provider', 'service_account', 'audience', 'credentials_json', 'create_credentials_file', 'export_environment_variables', 'token_format', 'delegates', 'cleanup_credentials', 'access_token_lifetime', 'access_token_scopes', 'access_token_subject', 'retries', 'backoff', 'backoff_limit', 'id_token_audience', 'id_token_include_email']

Expected behavior

There shouldn't be any warning since 'path', 'parent', 'destination', 'predefinedAcl' are valid inputs.

Observed behavior

No response

Action YAML

...
jobs:
  {NAME}:
    runs-on: ubuntu-latest
    steps:
      ...
      - name: Auth
        id: auth
        uses: google-github-actions/auth@v1
        with:
          path: ${{steps.path.outputs.path}}
          parent: false
          destination: ${{ steps.cdnpath.outputs.cdnpath }}/
          predefinedAcl: publicRead
          credentials_json: ${{ secrets.CDN_WRITER }}
      - name: Upload file
        id: upload-file
        uses: google-github-actions/upload-cloud-storage@v1
        with:
          path: ${{steps.path.outputs.path}}
          parent: false
          destination: ${{ steps.cdnpath.outputs.cdnpath }}/
          predefinedAcl: publicRead
      ...

Log output

{NAME}
Unexpected input(s) 'path', 'parent', 'destination', 'predefinedAcl', valid inputs are ['project_id', 'workload_identity_provider', 'service_account', 'audience', 'credentials_json', 'create_credentials_file', 'export_environment_variables', 'token_format', 'delegates', 'cleanup_credentials', 'access_token_lifetime', 'access_token_scopes', 'access_token_subject', 'retries', 'backoff', 'backoff_limit', 'id_token_audience', 'id_token_include_email']

Additional information

No response

sethvargo commented 1 year ago

Those are valid inputs to upload-cloud-storage, but not auth. Look directly above the "Upload file" step. You are passing invalid options to the auth action:

      - name: Auth
        id: auth
        uses: google-github-actions/auth@v1
        with:
          path: ${{steps.path.outputs.path}} # ! not valid
          parent: false # ! not valid
          destination: ${{ steps.cdnpath.outputs.cdnpath }}/ # ! not valid
          predefinedAcl: publicRead # ! not valid
          credentials_json: ${{ secrets.CDN_WRITER }}