Fix releasing (#603)

```
[command]/opt/hostedtoolcache/goreleaser-action/2.3.2-pro/x64/goreleaser release --nightly
  • by using this software you agree with its EULA, available at https://goreleaser.com/eula
  • running goreleaser v2.3.2-pro
  • only configurations files on  version: 2  are supported, yours is  version: 0 , please update your configuration
  ⨯ release failed after 0s                  error=only configurations files on  version: 2  are supported, yours is  version: 0 , please update your configuration
::error::The process '/opt/hostedtoolcache/goreleaser-action/2.3.2-pro/x64/goreleaser' failed with exit code 1
```

```
#20 [linux/arm64 builder 2/5] RUN apk add --no-cache make git
#20 CANCELED
------
 > [linux/amd64 builder 5/5] RUN make clean && make build:
0.058 go clean -x -i ./...
0.061 go: go.mod requires go >= 1.22 (running go 1.21.10; GOTOOLCHAIN=local)
0.061 make: *** [Makefile:176: clean] Error 1
------
 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
Dockerfile:8
--------------------
   6 |     WORKDIR /opt/src/act_runner
   7 |
   8 | >>> RUN make clean && make build
   9 |
  10 |     FROM alpine:3.18
--------------------
ERROR: failed to solve: process "/bin/sh -c make clean && make build" did not complete successfully: exit code: 2
::error::buildx failed with: ERROR: failed to solve: process "/bin/sh -c make clean && make build" did not complete successfully: exit code: 2
```

Reviewed-on: https://gitea.com/gitea/act_runner/pulls/603
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
This commit is contained in:
Jason Song 2024-09-24 08:22:53 +00:00 committed by Jason Song
parent 59e478464e
commit e27189ea32
4 changed files with 9 additions and 7 deletions

View file

@ -1,3 +1,5 @@
version: 2
before:
hooks:
- go mod tidy
@ -81,7 +83,7 @@ blobs:
provider: s3
bucket: "{{ .Env.S3_BUCKET }}"
region: "{{ .Env.S3_REGION }}"
folder: "act_runner/{{.Version}}"
directory: "act_runner/{{.Version}}"
extra_files:
- glob: ./**.xz
- glob: ./**.sha256
@ -97,10 +99,10 @@ checksum:
- glob: ./**.xz
snapshot:
name_template: "{{ .Branch }}-devel"
version_template: "{{ .Branch }}-devel"
nightly:
name_template: "nightly"
version_template: "nightly"
gitea_urls:
api: https://gitea.com/api/v1

View file

@ -1,4 +1,4 @@
FROM golang:1.21-alpine3.18 as builder
FROM golang:1.23-alpine AS builder
# Do not remove `git` here, it is required for getting runner version when executing `make build`
RUN apk add --no-cache make git
@ -7,7 +7,7 @@ WORKDIR /opt/src/act_runner
RUN make clean && make build
FROM alpine:3.18
FROM alpine
RUN apk add --no-cache git bash tini
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner

View file

@ -1,4 +1,4 @@
FROM golang:1.21-alpine3.18 as builder
FROM golang:1.23-alpine AS builder
# Do not remove `git` here, it is required for getting runner version when executing `make build`
RUN apk add --no-cache make git

2
go.mod
View file

@ -1,6 +1,6 @@
module gitea.com/gitea/act_runner
go 1.22
go 1.23
require (
code.gitea.io/actions-proto-go v0.4.0