Open
Description
Bug Description
When I only change the mode of a file (chmod +x ./src/file
), then commit the change and push it.
The ftp script does not seem to recognice the change. and does not alter the destination file mode.
My Action Config
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: Install dependencies
uses: php-actions/composer@v6
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
server: ${{ secrets.ftp_host }}
protocol: ftps
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}```
My Action Log
⚖️ File content is the same, doing nothing: src/file
Activity
SamKirkland commentedon Jul 26, 2021
Currently this action does not support setting file permissions.
Keep in mind the only information git stores about the file is if it can be executed or not. You should have to update that via the
update-index
command (chmod would not save the information to git).I have marked this issue as a enhancement. If other users request this feature it could be added via a new option specifying the file types to make executable, or by using the information set via
update-index
[-]`chmod +x` change is not detected[/-][+]NEW FEATURE: support file permissions[/+]thorst commentedon Dec 19, 2021
Yes, this would be nice to specify a file and the permissions it needs
timthelion commentedon Feb 2, 2022
I need this, but unfortunately it ain't gonna be easy as the library FTP-Deploy-Action uses to upload to FTP doesn't support this for all FTP servers:
patrickjuchli/basic-ftp#9
DRAFT: Add support for syncing file modes
DRAFT: Add support for syncing file modes
DRAFT: Add support for syncing file modes
Add support for syncing file modes
timthelion commentedon Feb 2, 2022
I implemented this today. There is a pull request waiting review.
timthelion commentedon Feb 2, 2022
@SamKirkland you can just add a
chmod
step in the github action flow file before the file sync if you need exotic file permissions. In my specific case, I had a hosting provider who's default file permissions were non-readable, so I just need to sync sane file permissions.Add support for syncing file modes
timthelion commentedon Jun 14, 2022
You can use my fork ex: https://github.com/vegan-buddies/vegan-buddies/blob/20e437da95379930c7dd05cecd87f6fe1801fee0/.github/workflows/website.yml#L34
. Unfortunately, I don't have time to redo the pull request with the better design. Sorry.