bacongobbler / azure-blob-storage-upload

Uploads assets to Azure Blob Storage
Other
54 stars 24 forks source link

Unrecognized arguments when pattern matching #31

Open adam-bentley opened 1 year ago

adam-bentley commented 1 year ago

When I try to use pattern matching, I get an error that the argument is not supported.

ERROR: unrecognized arguments: filename.sql

name: Upload To Azure Blob Storage
on:
  push:
    branches:
      - master
jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: bacongobbler/azure-blob-storage-upload@main
        with:
          sas_token: ${{ secrets.SASToken }}
          account_name : "spacestationdatabase"
          container_name: "spacestation-database"
          source_dir: "."
          overwrite: 'true'
          extra_args: '--pattern *.sql'

I've looked at these: https://github.com/bacongobbler/azure-blob-storage-upload/issues/24 https://github.com/bacongobbler/azure-blob-storage-upload/issues/15

But they don't seem to provide any insight.

Thanks for the help.

bacongobbler commented 1 year ago

Can you try the following?

extra_args: '--pattern “*.sql”’

Because the GitHub action passes the output into a shell script, it’s possible that wildcards passed into the arguments are being expanded.

adam-bentley commented 1 year ago

ERROR: unrecognized arguments: --overwrite true --pattern "*.sql"

name: Upload To Azure Blob Storage
on:
  push:
    branches:
      - master
jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: bacongobbler/azure-blob-storage-upload@main
        with:
          sas_token: ${{ secrets.SASToken }}
          account_name : "spacestationdatabase"
          container_name: "spacestation-database"
          source_dir: "."
          overwrite: 'true'
          extra_args: '--pattern "*.sql"'
          sync: 'true'
adam-bentley commented 1 year ago

Any update on this @bacongobbler

bacongobbler commented 1 year ago

No. Please feel free to share your learnings.

yomomano commented 3 months ago

I have similar problem with file names containing a dash "-" . Enclosing in quotes (extra_args: '--pattern "*.txt"') doesnt work: the pattern finds zero files (empty array).

Other suggestions?