From 84fcd9e2b8c0d4c00bfad6235011a978209d70cf Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Wed, 28 Feb 2024 20:57:19 +0800 Subject: [PATCH 1/4] fix: fix sync gitee failed. --- .github/workflows/gitee-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gitee-sync.yml b/.github/workflows/gitee-sync.yml index 47e08d2..02588d3 100644 --- a/.github/workflows/gitee-sync.yml +++ b/.github/workflows/gitee-sync.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source code - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Mirror Github to Gitee - uses: Yikun/hub-mirror-action@v1.2 + uses: Yikun/hub-mirror-action@v1.3 with: src: github/go-kratos dst: gitee/go-kratos From aaaa9563ffaaadcb01076642fe035ebe9ce43127 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Wed, 28 Feb 2024 21:00:33 +0800 Subject: [PATCH 2/4] build(dev): update dep version in action. --- .github/workflows/go.yml | 63 ++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7b45a76..c0b13c4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,35 +2,48 @@ name: Go on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: - build: name: Build runs-on: ubuntu-latest steps: - - - name: Set up Go 1.x - uses: actions/setup-go@v2 - with: - go-version: ^1.13 - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go 1.x + uses: actions/setup-go@v5.0.0 + with: + go-version: ^1.19 + + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Module cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file From 3731fa0759b556a17ded69c782213855c5c8c3ea Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Wed, 13 Mar 2024 18:53:24 +0800 Subject: [PATCH 3/4] fix: remove unnecessary indent. --- .github/workflows/go.yml | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c0b13c4..ea0d0bc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,39 +11,39 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Set up Go 1.x - uses: actions/setup-go@v5.0.0 - with: - go-version: ^1.19 - - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - - name: Module cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... \ No newline at end of file + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go 1.x + uses: actions/setup-go@v5.0.0 + with: + go-version: ^1.19 + + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Module cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file From b355d980c6d98ca4f3873eb6397073a6e3fb0500 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Wed, 13 Mar 2024 19:36:16 +0800 Subject: [PATCH 4/4] remove unnecessary space. --- .github/workflows/gitee-sync.yml | 28 ++++++------- .github/workflows/go.yml | 72 ++++++++++++++++---------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/gitee-sync.yml b/.github/workflows/gitee-sync.yml index 02588d3..5a15668 100644 --- a/.github/workflows/gitee-sync.yml +++ b/.github/workflows/gitee-sync.yml @@ -11,17 +11,17 @@ jobs: name: Run runs-on: ubuntu-latest steps: - - name: Checkout source code - uses: actions/checkout@v4 - - name: Mirror Github to Gitee - uses: Yikun/hub-mirror-action@v1.3 - with: - src: github/go-kratos - dst: gitee/go-kratos - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} - dst_token: ${{ secrets.GITEE_TOKEN }} - account_type: org - timeout: 600 - debug: true - force_update: true - static_list: "kratos-layout" \ No newline at end of file + - name: Checkout source code + uses: actions/checkout@v4 + - name: Mirror Github to Gitee + uses: Yikun/hub-mirror-action@v1.3 + with: + src: github/go-kratos + dst: gitee/go-kratos + dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} + dst_token: ${{ secrets.GITEE_TOKEN }} + account_type: org + timeout: 600 + debug: true + force_update: true + static_list: "kratos-layout" \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ea0d0bc..e09d086 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,39 +11,39 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Set up Go 1.x - uses: actions/setup-go@v5.0.0 - with: - go-version: ^1.19 - - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - - name: Module cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... \ No newline at end of file + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go 1.x + uses: actions/setup-go@v5.0.0 + with: + go-version: ^1.19 + + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Module cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file