Warning
This guide is a work in progress and may not be complete.
Note: This guide is not updated for Compose but those tests work similar.
To contribute to the documentation site go to cssnr/stack-deploy-docs.
- Fork the repository.
- Create a branch in your fork!
- Make your changes.
- Test your changes.
- Commit and push your changes.
- Create a PR to this repository.
- Verify the tests pass, otherwise resolve.
- Make sure to keep your branch up-to-date.
GitHub is easier to set up, but you have to push your commits to test.
Running locally is harder to set up, but it is much easier to test; and by far recommended!
Test #1 test password authentication and uses the following secrets:
secrets.DOCKER_HOST - SSH Hostname.
secrets.DOCKER_PORT - SSH Port.
secrets.DOCKER_USER - SSH Username.
secrets.DOCKER_PASS - SSH Password.
Test #2 tests both SSH auth and registry auth and runs on GitHub by default. To test this on GitHub you need to additionally add the following secrets and variables:
vars.PRIVATE_IMAGE - Image to your private image.
vars.DOCKER_HUB_USER - Private registry username.
secrets.DOCKER_HUB_PASS - Private registry password.
secrets.DOCKER_SSH_KEY - SSH Private Key.
When you push your branch to your repository, the test.yaml should run...
To run actions locally you need to install act: https://nektosact.com/installation/index.html
- Create a
.secretsfile with all your secrets in .env file format (see GitHub).
act -j test -e event.jsonThe flag -e event.json disabled test #2 which tests SSH auth and registry auth.
To test both SSH and registry auth (run test #2) do the following.
- Create a
.varsfile and add the vars and secrets from test #2 under GitHub.
Then run the test without the -e event.json flag.
act -j testTo print your secrets in plan text (insecure) use --insecure-secrets
To see all available jobs run act -l and for more details run act --help
act -l
act -j lint
act -j test --insecure-secrets -e event.json
act -j test --env PRIVATE_IMAGE=your/private-image:latestFor more information see the documentation: https://nektosact.com/usage/index.html