Skip to content

Refactor: Convert Docker action to composite action for speed and add… #15

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

Closed
wants to merge 3 commits into from

Conversation

FarisZR
Copy link
Owner

@FarisZR FarisZR commented Jun 27, 2025

  • 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.

… 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.
@FarisZR FarisZR closed this Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant