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 .