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:
parent
0d1a3ae368
commit
9d1d40c08a
@ -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
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,4 +20,4 @@
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
|
||||
release
|
||||
|
Loading…
x
Reference in New Issue
Block a user