Skip to content
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

ARGS: parameter not set - make ARGS optional #9

Closed
Misiu opened this issue Sep 16, 2019 · 5 comments
Closed

ARGS: parameter not set - make ARGS optional #9

Misiu opened this issue Sep 16, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Misiu
Copy link
Contributor

Misiu commented Sep 16, 2019

Hi there,
recent version adds support for ARGS parameter, but if someone isn't using it then the deploy won't work.
I get this error:

Starting FTP Deploy
Uploading files...
/entrypoint.sh: line 12: ARGS: parameter not set

I use Your action like so:

    - name: FTP Deploy
      uses: SamKirkland/FTP-Deploy-Action@master
      env: 
       FTP_SERVER: ${{ secrets.FTP_SERVER }}
       FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
       FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
       REMOTE_DIR: ${{ secrets.REMOTE_DIR }}
       LOCAL_DIR: ${{ secrets.LOCAL_DIR }}

Can ARGS be optional?

@jcolls
Copy link

jcolls commented Sep 16, 2019

Not sure if it's related but I'm getting the following error regarding Docker on the FTP-Deploy-Action step following this update.

/entrypoint.sh: line 12: ARGS: parameter not set
Starting FTP Deploy
Uploading files...
##[error]Docker run failed with exit code 2

update: I added ARGS --delete to my action and it completed successfully.

@Misiu
Copy link
Contributor Author

Misiu commented Sep 16, 2019

@jcolls yes, but this will remove all existing files on Your FTP, as I workaround I added --no-empty-dirs. It's safer because it won't delete anything.

@jcolls
Copy link

jcolls commented Sep 16, 2019

@jcolls yes, but this will remove all existing files on Your FTP, as I workaround I added --no-empty-dirs. It's safer because it won't delete anything.

Thanks. I thought --delete was to only remove files that did not exist, i.e if I delete a file then it will remove that file from FTP. But maybe this is achieved by deleting all and then uploading all.

I will change the ARGS to the one you have suggested for now. Cheers

@SamKirkland SamKirkland self-assigned this Sep 16, 2019
@SamKirkland SamKirkland added the bug Something isn't working label Sep 16, 2019
@SamKirkland
Copy link
Owner

Sorry about this. ARGS is definitely supposed to be optional.
Should be fixed now!

--delete will remove files that exist on the server but don't exist on github.
Example: If I delete README.md and commit that change the file will still exist on the server but will not exist in source control.
If I use the --delete argument the README.md file will be removed from the server because it's no longer in source control.

@Misiu
Copy link
Contributor Author

Misiu commented Sep 17, 2019

@SamKirkland I see that in recent PR You assign a default value to ARGS, but why do you use REMOTE_DIR instead of ARGS? https://github.com/SamKirkland/FTP-Deploy-Action/blob/master/entrypoint.sh#L11
Shouldn't it be WDEFAULT_ARGS=${ARGS:-""}? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants