From 702ba81ccd43d7bfe26691963c3bdc029201b0b9 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Fri, 14 Oct 2022 23:26:59 +0800 Subject: [PATCH] Chore: update workflows --- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/docker.yml | 4 ++++ .github/workflows/linter.yml | 10 +++------- .github/workflows/release.yml | 10 +++------- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d4f6697..4a70339 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -16,15 +16,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dfe791c..f1505a3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -57,6 +57,8 @@ jobs: tags: | xjasonlyu/tun2socks:dev ghcr.io/xjasonlyu/tun2socks:dev + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build and Push (latest) if: startsWith(github.ref, 'refs/tags/') @@ -70,3 +72,5 @@ jobs: xjasonlyu/tun2socks:${{ steps.shell.outputs.version }} ghcr.io/xjasonlyu/tun2socks:latest ghcr.io/xjasonlyu/tun2socks:${{ steps.shell.outputs.version }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index cb75ff9..671f39c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,15 +6,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Get latest go version - id: version - run: | - echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') - - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: ${{ steps.version.outputs.go_version }} + check-latest: true + go-version: '1.19' - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0229226..bd7939e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,15 +15,11 @@ jobs: with: fetch-depth: 0 - - name: Get latest Go version - id: version - run: | - echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') - - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: ${{ steps.version.outputs.go_version }} + check-latest: true + go-version: '1.19' - name: Cache go module uses: actions/cache@v2