-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excludes specified in FLAGS don't work #82
Comments
One more data-point: excluding using But only if you don't wrap the filename in double-quotes. Wrap it in doulequotes and this breaks. :( |
Thanks for the report! I was able to reproduce the behavior you're seeing and traced it back to the quotes around the default I'm not sure when it will be released, but I plan on working on the fix today. In the meantime, you can override the default flags by setting your own - just remove the double quotes that were in the - name: GitHub Action Deploy to WP Engine
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: ${{ inputs.wpe-env }}
SRC_PATH: ${{ inputs.src-path }}
REMOTE_PATH: ${{ inputs.remote-path }}
PHP_LINT: TRUE
FLAGS: -azvr --inplace --exclude=.* |
Has this been fixed, or do we still need to remove the double quotes that were in the |
This should be fixed. I've spent a literal day to just figure out that all my |
A workaround I've used: instead of using jobs:
deploy:
steps:
- name: Write excludes file
run: |
cat << EOF > .deploy-wpengine-ignore
.*
package.*
tests
README.md
EOF
- name: Deploy to WPEngine
uses: wpengine/github-action-wpe-site-deploy@v3
with:
FLAGS: -azvr --inplace --exclude-from=.deploy-wpengine-ignore |
Well, yeah, this is a way to do it. The main problem here is a documentation showing the examples with quotes. That's a little bit misleading. |
In addition to the docs update in #94, a complete fix for this issue was released in v1.0.4 of the Quotes (both single and double) are now automatically stripped from FLAGS. Only use them when you have a flag that contains whitespace in its value. For example, you need single quotes for the - name: Deploy to WPEngine
uses: wpengine/github-action-wpe-site-deploy@v3
with:
...
FLAGS: -azvr --inplace --delete --exclude=.* --filter=':- .gitignore' Full details of the fix are available in wpengine/site-deploy#32. More documentation updates coming in #105.
This is not the call that transfers files from the action runner to WPE. It's something rsync does under the hood to start the rsync process on the receiving end. The command that's responsible for initiating the sync wasn't previously available in the action's output. However, it has been added in v3.2.6 of the action. You should now see a line in your action's output that starts with
Additionally, we've added some more information to the action log to help with debugging flags. It looks something like this:
|
It appears that the action is not honoring "--exclude" flags in the
FLAGS
value. Neither the default--exclude=".*"
, nor custom patterns defined with--exclude
in aFLAGS
override are excluding any files.Using this workflow step:
and providing no override for
FLAGS
, here is snipped output from the workflow in github actions. (I've replaced the environment and plugin names here):Note that:
FLAGS
value as-azvr --inplace --exclude=".*"
. This should exclude all files starting with a dot.rsync --server -vlogDtprze.iLsfxClvu --inplace
is being called. if that's the rsync call that is transferring files from the action runner to WPE, it is not including the flags inFLAGS
.--exclude=".*"
(including.eslintrc
,.prettierignore
, etc).Those files are indeed transferred to the WPE host; so even if that debug output is misleading and describes some other rsync operation that is happening, one way or the other the files that should be excluded are included.
To reproduce
Define a github actions workflow to deploy a particular source directory to a particular destination. Either define a
FLAGS
value with custom--exclude
flags, or leave it as the default value. Note that files in the repository that should be excluded are sent to the WPE host.Expected behavior
Including an
--exclude=<pattern>
flag inFLAGS
should prevent files matching the pattern from being sent to WPE.Version information
The text was updated successfully, but these errors were encountered: