Add input to disable info logging
Description of problem
When using the GitHub action in a public repo, it prints out the possibly "private" git remote URL.
How reproducible
Just use the Dokku GitHub Action.
Steps to Reproduce
- Configure a public repo to deploy to Dokku using the GitHub Action
- Specify the remote git URL using an encrypted environment variable
- See the parsed remote git URL in the action log
Actual Results
See the parsed SSH host and port in the GitHub action log.
Expected Results
Have an optional input to disable the printing of any output (e.g. via a flag in log-info in dokku/ci-docker-image).
If it is secret, why not specify it via a github secret? Those get redacted automatically from output.
If it is secret, why not specify it via a github secret? Those get redacted automatically from output.
I did, but https://github.com/dokku/ci-docker-image/blob/4661c62a16ba6a77336c043b44dda37d4f6b9cf0/bin/setup-ssh#L26 will make this moot and print the parsed git remote URL.
Ah. We can just drop printing the host?
Ah. We can just drop printing the host?
Yeah, there is some more info afterwards, which I'm not sure where it comes from:
Generating SSH_HOST_KEY from ssh-keyscan against example.com:22
# example.com:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
# example.com:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
# example.com:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
# example.com:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
# example.com:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
and then its resolved IP as well
Pushing to Dokku Host
ECDSA host key for IP address '111.222.333.444' not in list of known hosts.
https://github.com/dokku/ci-docker-image/blob/4661c62a16ba6a77336c043b44dda37d4f6b9cf0/bin/setup-ssh#L27
that line can probably be silenced somehow to not output the domain
https://github.com/dokku/ci-docker-image/blob/4661c62a16ba6a77336c043b44dda37d4f6b9cf0/bin/dokku-deploy#L71
Is there a command we can use to add the host to known_hosts?
If you add your IP as a github secret and use it in the git_remote_url option, it'll be omitted

Hi, I got similar needs.
I tried using --quiet git push flags without success.
- name: Push to dokku
uses: dokku/github-action@master
with:
git_push_flags: '-q'
git_remote_url: ${{ secrets.GIT_REMOTE_URL }}
ssh_private_key: ${{ secrets.SSH_DOKKU_PRIVATE_KEY }}
branch: main
But git push output is still there ...
@qdequippe open up a different issue if your problem is that the git push is still verbose.
I think if the workaround for @Xetera is reasonable - if annoying. Happy to take a PR to fix this otherwise, but closing for now.