milanmk / actions-file-deployer

Composite GitHub Action (Linux runner) for deploying repository content to remote server. Fast and customizable deployment with proxy support. Deploy only changed files or do full sync/mirror of repository content.
The Unlicense
62 stars 14 forks source link

Question: How best to verify uploaded files? #29

Open glenthomas opened 6 months ago

glenthomas commented 6 months ago

I am using this action to perform an SFTP upload and have seen an issue where a connection problem resulted in 0 byte files existing on the FTP server.

I would like to add some verification to the file upload so that I can be 100% sure that all files have been uploaded completely. What is the best way to achieve this?

I have considered some options already:

  1. Input artifacts: true and compare the content of the generated transfer_log.txt file to the files on the local disk.
  2. Input ftp-options: 'set xfer:verify true' to run a verify command. I'm not sure if this is doing anything as I don't see anything additional in the log output with this enabled.
  3. After the upload has completed, download all files from the FTP server and compare with the files on the local disk to check that they match. I haven't yet found a GitHub Action to do SFTP download....

I'm interested in any other suggestions, thanks.

milanmk commented 6 months ago

For point 2., I will suggest enabling the debug mode debug: true so that it will output more verbosely about the verification process.