feat: GitHub Action for CI/CD hosts file setup
@cjimti is already working on this.
Since Feb 8, 2026.
- Dominant language
- Go
- Stars
- 342
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Problem
CI jobs that test against named services need hosts file entries. Most projects handle this with a raw echo >> /etc/hosts step. Cleanup on failure usually doesn't happen.
Proposed solution
A GitHub Action in a separate repo (txn2/txeh-action) that wraps the txeh CLI. It adds entries in a setup step and removes them in a post step, so cleanup happens even if the job fails.
- uses: txn2/txeh-action@v1
with:
entries: |
10.0.0.1 db.test.local
10.0.0.2 api.test.local
Needs its own repo so GitHub Actions versioning (@v1 tags) works independently from the library's release tags.
Should work on Ubuntu, macOS, and Windows runners.
Alternatives considered
The echo >> /etc/hosts approach works fine for simple cases. The value here is mostly cleanup and cross-platform support, which may not justify a separate repo until profiles (#44) make setup/teardown more useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.