From 34e5a3ecbd2be501bc1b60d2e082385fcddee9ed Mon Sep 17 00:00:00 2001 From: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com> Date: Fri, 17 May 2024 03:04:01 +0530 Subject: [PATCH] Bump go, golangci-lint and github actions Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com> --- .github/workflows/golangci-lint.yml | 10 +++++----- .github/workflows/release.yml | 6 +++--- .github/workflows/test-gh.yml | 16 +++++++--------- .github/workflows/trivy-scan.yml | 3 ++- go.mod | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 19ebb16c..ecb71337 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,15 +13,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.22.2 - - uses: actions/checkout@v2 + go-version: '1.22' + - uses: actions/checkout@v4 with: fetch-depth: '0' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.54 + version: v1.58 args: -v diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3fb9386..2bf50f77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,13 +13,13 @@ jobs: id-token: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: 1.22.2 + go-version: '1.22' - name: Set up Cosign uses: sigstore/cosign-installer@v3 - name: Retrieve version diff --git a/.github/workflows/test-gh.yml b/.github/workflows/test-gh.yml index ef52c81f..6400452a 100644 --- a/.github/workflows/test-gh.yml +++ b/.github/workflows/test-gh.yml @@ -11,19 +11,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v1 + uses: actions/setup-go@v5 with: - go-version: 1.22.2 + go-version: '1.22' - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: path: src/github.com/${{ github.repository }} + fetch-depth: 0 - name: Run Tests env: VENDIR_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -e -x - export GOPATH=$(echo `pwd`/../../../../) + export GOPATH=$(pwd) # Delete default installed helm sudo rm `which helm` @@ -31,11 +32,6 @@ jobs: mkdir -p /tmp/bin export PATH=/tmp/bin:$PATH - # imgpkg - wget -O- https://github.com/k14s/imgpkg/releases/download/v0.7.0/imgpkg-linux-amd64 > /tmp/bin/imgpkg && \ - echo "bb90881c2c03cad4d50b2f0881d1330d341a37bb55bd8fff50bf228f7cfcf3d2 /tmp/bin/imgpkg" | shasum -c - && \ - chmod +x /tmp/bin/imgpkg - # helm 2 wget -O- https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz > /tmp/helm2.tgz && \ echo "f3bec3c7c55f6a9eb9e6586b8c503f370af92fe987fcbf741f37707606d70296 /tmp/helm2.tgz" | shasum -c - && \ @@ -48,6 +44,8 @@ jobs: mkdir /tmp/helm3-unpacked && tar -C /tmp/helm3-unpacked -xzvf /tmp/helm3.tgz && \ mv /tmp/helm3-unpacked/linux-amd64/helm /tmp/bin/helm3 + cd "src/github.com/${{ github.repository }}" + export VENDIR_E2E_HELM2_BINARY=helm2 export VENDIR_E2E_HELM3_BINARY=helm3 diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index 73674847..fd5e6b5f 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -1,6 +1,7 @@ name: Trivy CVE Dependency Scanner on: + workflow_dispatch: schedule: - cron: '0 0 * * *' @@ -10,7 +11,7 @@ jobs: with: repo: carvel-dev/vendir tool: vendir - goVersion: 1.22.2 + goVersion: '1.22' secrets: githubToken: ${{ secrets.GITHUB_TOKEN }} slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/go.mod b/go.mod index e11935c1..2fde3909 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module carvel.dev/vendir -go 1.22 +go 1.22.3 require ( carvel.dev/imgpkg v0.42.0