diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index 92ad663..b1a8979 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -24,6 +24,33 @@ jobs: with: fetch-depth: 0 # all history for all branches and tags + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + + - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 + id: hash-go + with: + patterns: | + go.mod + go.sum + - name: cache go + id: cache-go + uses: https://github.com/actions/cache@v3 + with: + path: | + /go_path + /go_cache + key: go_path-${{ steps.hash-go.outputs.hash } + + - name: Build binary + env: + TAGS: "" + run: | + make docker-build-linux-amd64 + make docker-build-linux-arm64 + - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.gitignore b/.gitignore index adf8f72..e969650 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ # Go workspace file go.work - +release diff --git a/main.go b/main.go deleted file mode 100644 index 6965235..0000000 --- a/main.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import ( - "gitea.com/action-examples/go/router" -) - -func main() { - r := router.New() - // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080") - if err := r.Run(); err != nil { - panic(err) - } -}