mirror of
https://gitea.com/action-examples/Go.git
synced 2026-03-27 08:30:06 +00:00
chore: refactor build process and repository cleanup
- Introduce Go setup and caching in Docker GitHub Actions workflow - Add `release` directory to `.gitignore` - Remove `main.go` file from the repository Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user