diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 948ad7b..1771146 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,9 @@ permissions: contents: read pull-requests: read +env: + GO_VERSION: '1.22' + jobs: golangci: name: lint @@ -22,9 +25,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod - cache: true - cache-dependency-path: go.sum + go-version: ${{ env.GO_VERSION }} + - uses: golangci/golangci-lint-action@v5 with: version: v1.54 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eea344a..5c93c8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: tags: - "v*" +env: + GO_VERSION: '1.22' + jobs: build: runs-on: ubuntu-latest @@ -13,10 +16,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up Go 1.22 - uses: actions/setup-go@v4 + - name: Set up Go + uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: ${{ env.GO_VERSION }} - name: Build run: make build diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index 9675820..2c73d9b 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -6,6 +6,9 @@ on: schedule: - cron: 0 23 * * * +env: + GO_VERSION: '1.22' + jobs: build: name: building defsec @@ -18,17 +21,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 - if: matrix.os != 'windows-latest' - with: - go-version-file: go.mod - cache: true - cache-dependency-path: go.sum - - - uses: actions/setup-go@v5 - if: matrix.os == 'windows-latest' with: - go-version-file: go.mod - cache: false + go-version: ${{ env.GO_VERSION }} - name: go mod tidy if: matrix.os == 'ubuntu-latest'