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.
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?
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?
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.
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.
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.