From f11c123baa5c7ee57806db24b894fe0494577414 Mon Sep 17 00:00:00 2001 From: David Zhang Date: Thu, 12 Sep 2024 13:52:11 +0800 Subject: [PATCH] chore(ci): update to latest --- .github/workflows/ci.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eefa442..4eabb4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,31 @@ name: build -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: checks: name: run runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v3 - - name: run - uses: actions/setup-go@v2 + - name: cache + uses: actions/cache@v3 with: - go-version: "1.13" - env: - GO111MODULE: "on" + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: setup + uses: actions/setup-go@v3 + with: + go-version: "1.18" - name: lint uses: morphy2k/revive-action@v2