From bb0f321849ae73b00be23d8d429b7c774891a0b5 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 12 Jun 2026 15:47:51 +0800 Subject: [PATCH] ci: replace setup-go action with manual Go install from go.dev actions/setup-go@v5 was failing silently (0s steps) likely due to network issues downloading Go from GitHub. Install Go directly from go.dev which is more accessible. Also remove Docker job (not needed yet) and simplify to 3 jobs. --- .gitea/workflows/ci.yml | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4f4c496..5e7ad51 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -17,10 +17,12 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true + - name: Install Go + run: | + GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}') + curl -sL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xzf - + echo "/usr/local/go/bin" >> $GITHUB_PATH + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: Check formatting run: | @@ -43,10 +45,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true + - name: Install Go + run: | + GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}') + curl -sL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xzf - + echo "/usr/local/go/bin" >> $GITHUB_PATH - name: Run unit tests run: go test -race -count=1 ./internal/... @@ -60,26 +63,14 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true + - name: Install Go + run: | + GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}') + curl -sL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xzf - + echo "/usr/local/go/bin" >> $GITHUB_PATH - name: Build run: make build - name: Verify binary run: ./bin/lolly --help - - docker: - name: Docker - needs: build - if: github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - run: docker build -t lolly:latest .