azure-blob-storage-upload icon indicating copy to clipboard operation
azure-blob-storage-upload copied to clipboard

Pattern matching outside of source_dir

Open oldShatteredHands7 opened this issue 3 months ago • 1 comments

I am not sure if this is a bug or working as designed.

I have a couple of .tgz in the working directory. Based on the user input selected or all .tgz files are moved into directory ./deploy.

My issue is that the upload will fail if not all .tgz files are moved into ./deploy with error message ERROR: unrecognized arguments: <all .tgz filenames without path> e.g.(ERROR: unrecognized arguments: file1.tgz file2.tgz)

A workaround is to remove the pattern from extra_args.

I don't get any helpful information from the debug logs but I guess that the pattern matching will include files from the parent directory and since these files do not exist in ./deploy the command will fail

My upload configuration is as follows:

- name: Upload To Azure Blob Storage
        uses: bacongobbler/azure-blob-storage-upload@main
        with:
            source_dir: "deploy"
            container_name: apps-test
            sas_token: ${{ secrets.SASToken }}
            account_name : "storage"
            extra_args: '--pattern *.tgz --destination-path searchApps'
            overwrite: 'true'

oldShatteredHands7 avatar Mar 26 '24 08:03 oldShatteredHands7