Create-zip-package-action not including folders starting with .?

I’ve been having some issues deploying an azure function app through GitHub actions, and it turns out the issue comes down to the zip file being made by the create-zip-package-action doesn’t include the directory .azurefunctions. If I swap this action out for a step that just calls Compress-Archive pwsh commandlet then the files are there and it works. My step looks like this:

    - name: Zip function app
      uses: OctopusDeploy/create-zip-package-action@v3
      with:
        package_id: 'MyFunctionApp'
        version: '${{env.package_version}}'
        output_folder: './packages'
        base_path: ./publish/MyFunctionApp
        files: |
          **/*.* 

Is there a different string I should be using in the files parameter that will also include folders that start with .? I just want everything included, no exceptions.

cheers!

Hi @Iain_Brown ,

Just to confirm I’m following exactly what the scenario is, are you saying that there is a folder: ./publish/MyFunctionApp/.azurefunctions and that folder and its contents arent getting packaged up using our built in step?

Looking forward to hearing back.

Best,
Jeremy

Hi Jeremy, thanks for looking at this for me.

Yes you have the situation correct. Everything else in that directory gets added to the zip correctly.

You’re very welcome!

Thanks for confirming that. I’m gonna pass this along to the developers that work on that plugin, but in case they need to know, is this running on a linux or windows github agent?

Best,
Jeremy

I think it’s happening for both, but for sure I was seeing it with a windows agent.

Hi Iain,

Our developers are still working on a fix for this but have suggested the following as a workaround.

The files parameter is multiline, so making it something like:
files: | 
  **/*
  **/.*
will pick up all files, including all dot-files.

Regards,
Paul

Hey Paul, thanks for the idea, but as written that file mask only picked up the top level folder of .azurefunctions. To pick up the contents of that folder and its sub folders I used the following file mask instead:

        files: |
          **/*.*
          .*/**/*.*

This will obviously only pick up folders starting with dots in the root directory, which is a little fragile, but this seems to work for me for now.

2 Likes

I should probably add some context here, in that the .azurefunctions folder isn’t one I’ve added (if it was I would have renamed it), it’s a standard folder that’s created by dotnet when building a isolated process azure function.

Thanks for the extra context! The developers said a fix should be out pretty soon if everything goes to plan.

Best,
Jeremy

1 Like

That seems to be live now, I’ve just tried again with a **/*.* file parameter and all my files seem to be there now.

Thanks for your help!

1 Like

You’re very welcome! Thanks for letting me know it worked. If you run into any other snags in the future let us know. I hope you have a great rest of your week.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.