diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68ed4f9..716964e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build images run: make docker diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7254627 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +gateway-sim-key* diff --git a/Makefile b/Makefile index 0fca764..f0ee407 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: docker link setup gateway +.PHONY: docker link setup gateway ci docker: docker build -t fractalnetworks/selfhosted-gateway:latest ./src/gateway/ @@ -17,3 +17,7 @@ link: link-macos: docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" --rm -it fractalnetworks/gateway-cli:latest $(GATEWAY) $(FQDN) $(EXPOSE} + +ci: + ssh-keygen -t ed25519 -f ./ci/gateway-sim-key -N "" + docker build -t fractalnetworks/gateway-sim -f ./ci/Dockerfile ./ci diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 0000000..9c7fb71 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine:latest +RUN apk add openssh-server +RUN ssh-keygen -A + +COPY gateway-sim-key.pub /root/.ssh/authorized_keys + +ENTRYPOINT [ "/usr/sbin/sshd", "-D", "-e" ] +