For security, I would never allow a github action script to SSH directly to the server. All it takes is one bad actor to commit an update to the github action workflow script to ruin the day, leak passwords, and pretty much take full control. An alternative to this would be to build the docker image and push it to a container registry. Then you can use either a webhook or make the server poll for changes in the container registry before pulling and running the docker image. Might make a vid about it some day, but I am lazy... :3
For security, I would never allow a github action script to SSH directly to the server. All it takes is one bad actor to commit an update to the github action workflow script to ruin the day, leak passwords, and pretty much take full control.
An alternative to this would be to build the docker image and push it to a container registry. Then you can use either a webhook or make the server poll for changes in the container registry before pulling and running the docker image.
Might make a vid about it some day, but I am lazy... :3
Agreed. I am planning to make a part 2 where the image will be pushed to DOCR.
is repo link available?
Here's the link github.com/rahulnpadalkar/deploy-with-actions