diff --git a/.github/workflows/docker-caddy.yml b/.github/workflows/docker-caddy.yml index fbba805..6d503da 100644 --- a/.github/workflows/docker-caddy.yml +++ b/.github/workflows/docker-caddy.yml @@ -1,7 +1,9 @@ name: docker-caddy on: - workflow_dispatch: + push: + tags: + - "caddy*" jobs: build: diff --git a/.github/workflows/docker-dev-env.yml b/.github/workflows/docker-dev-env.yml deleted file mode 100644 index 9a2ce13..0000000 --- a/.github/workflows/docker-dev-env.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: docker-dev-env - -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: nite07/dev-env:latest - platforms: linux/amd64 - context: ./dev-env diff --git a/.github/workflows/docker-tailscale-derper.yml b/.github/workflows/docker-tailscale-derper.yml index 84ee047..e025c3e 100644 --- a/.github/workflows/docker-tailscale-derper.yml +++ b/.github/workflows/docker-tailscale-derper.yml @@ -1,9 +1,9 @@ name: docker-tailscale-derper on: - schedule: - - cron: "0 0 * * 1" - workflow_dispatch: + push: + tags: + - "tailscale*" jobs: build: diff --git a/README.md b/README.md index f281b22..c26874c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ - [tailscale derper](./README-tailscale-derper.md) -- my dev env +- caddy diff --git a/dev-env/Dockerfile b/dev-env/Dockerfile deleted file mode 100644 index 303c36f..0000000 --- a/dev-env/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM debian:12 - -RUN apt-get update && apt-get install -y \ - curl \ - git \ - vim \ - wget \ - unzip \ - make \ - gcc \ - build-essential \ - openssh-server - -RUN rm -rf /var/lib/apt/lists/* - -ENV GO_VERSION=1.21.3 -RUN curl -OL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz -RUN tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz -RUN rm go${GO_VERSION}.linux-amd64.tar.gz - -ENV PATH=$PATH:/usr/local/go/bin -ENV GOPATH=/go -ENV PATH=$PATH:$GOPATH/bin - -WORKDIR /workspace - -RUN go install github.com/go-delve/delve/cmd/dlv@latest -RUN go install golang.org/x/tools/gopls@latest -RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest -RUN go install github.com/goreleaser/goreleaser/v2@latest - -RUN mkdir /var/run/sshd -RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config - -EXPOSE 22 - -COPY start.sh /start.sh -RUN chmod +x /start.sh - -ENTRYPOINT ["/start.sh"] -CMD ["bash"] diff --git a/dev-env/docker-compose.yaml b/dev-env/docker-compose.yaml deleted file mode 100644 index e3b3e3d..0000000 --- a/dev-env/docker-compose.yaml +++ /dev/null @@ -1,12 +0,0 @@ -services: - dev-env: - image: nite07/dev-env:latest - volumes: - - ./workspace:/workspace - restart: unless-stopped - tty: true - stdin_open: true - ports: - - 2222:22 - environment: - - SSH_PASSWORD=changeme diff --git a/dev-env/start.sh b/dev-env/start.sh deleted file mode 100644 index 460adb9..0000000 --- a/dev-env/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ -z "$SSH_PASSWORD" ]; then - echo "Error: SSH_PASSWORD is not set. Please provide a password." - exit 1 -fi - -echo "root:$SSH_PASSWORD" | chpasswd -echo "SSH password for root is set to: $SSH_PASSWORD" - -service ssh start - -exec "$@"