Refactor: Convert Docker action to composite action for speed and add…#15
Closed
Refactor: Convert Docker action to composite action for speed and add…#15
Conversation
… tests - Converted the Docker-based GitHub Action to a composite action. This speeds up execution by removing the need for Docker image build/pull for the action itself. - All original inputs and core functionality are preserved. - Added a comprehensive testing workflow (`.github/workflows/test.yml`) that uses a service container for SSH and mocks Docker commands to verify action behavior across various scenarios (SSH, upload, Swarm, Login, Tailscale). - Updated README.md to reflect the change to a composite action and to document the new testing strategy. - Removed obsolete `Dockerfile` and `docker-entrypoint.sh`.
…iner - Reverted .github/workflows/test.yml to the correct version which uses GITHUB_OUTPUT for keys, netcat for port checking, and has better service readiness logic. - Modified the test workflow to explicitly create /root/.ssh directory on the SSH service container before attempting to copy the public key. This resolves potential errors if the directory doesn't exist by default in some edge cases of the service image or its startup. This addresses the previously reported test failures.
Updated .github/workflows/test.yml to use `rastasheep/ubuntu-sshd:jammy` instead of `rastasheep/ubuntu-sshd:22.04`, as the latter tag was not found. 'jammy' corresponds to Ubuntu 22.04 and should resolve the Docker pull error for the test service container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This speeds up execution by removing the need for Docker image build/pull for the action itself.
.github/workflows/test.yml)that uses a service container for SSH and mocks Docker commands to verify action behavior across various scenarios (SSH, upload, Swarm, Login, Tailscale).
Dockerfileanddocker-entrypoint.sh.