From a79481986945a9700a4b3f91054e74a8ced6dc47 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Thu, 21 Jul 2022 15:15:14 +0800 Subject: [PATCH] Chore: upgrade actions and fixed golangci-lint version --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/docker.yml | 12 ++++++------ .github/workflows/linter.yml | 12 ++++-------- .github/workflows/release.yml | 10 +++------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8a36dc97..52b6afc8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,12 +19,12 @@ jobs: 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 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 19fe0d88..d4cba355 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,24 +18,24 @@ jobs: fetch-depth: 0 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all - name: Set up docker buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: version: latest - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to Github Package - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: Dreamacro @@ -43,7 +43,7 @@ jobs: - name: Build dev branch and push if: github.ref == 'refs/heads/dev' - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -70,7 +70,7 @@ jobs: - name: Build release and push if: startsWith(github.ref, 'refs/tags/') - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index a81cfc1c..15f6fac7 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,17 +6,13 @@ 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.18' - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: latest + version: v1.46.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08f97ba3..e1f5d68d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,15 +4,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - 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.18' - name: Check out code into the Go module directory uses: actions/checkout@v3