diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 75018a6..d9d153c 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run the formatter, linter, and vetter uses: dell/common-github-actions/go-code-formatter-linter-vetter@main with: @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run the forbidden words scan uses: dell/common-github-actions/code-sanitizer@main with: @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run unit tests and check package coverage uses: dell/common-github-actions/go-code-tester@main with: @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run Go Security uses: securego/gosec@master with: @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run malware scan uses: dell/common-github-actions/malware-scanner@main with: @@ -61,13 +61,11 @@ jobs: name: Image Scanner runs-on: ubuntu-latest steps: - - name: Set up Go 1.21+ + - name: Set up Go latest uses: actions/setup-go@v2 - with: - go-version: ^1.21 id: go - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Mockgen run: go get github.com/golang/mock/mockgen@v1.4.4 - name: Get dependencies diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index e7aad32..9421ad0 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.22" cache: false - name: Checkout the code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4 - name: Vendor packages run: | go mod vendor diff --git a/Dockerfile b/Dockerfile index 6a7f230..8c99196 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ ARG BASEIMAGE +ARG GOIMAGE # Build the sdk binary -FROM golang:1.21 as builder +FROM $GOIMAGE as builder # Set envirment variable ENV APP_NAME csm-metrics-powerstore diff --git a/Makefile b/Makefile index f32f0af..748d526 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ test: .PHONY: docker docker: download-csm-common $(eval include csm-common.mk) - docker build -t csm-metrics-powerstore -f Dockerfile --build-arg BASEIMAGE=$(DEFAULT_BASEIMAGE) . + docker build -t csm-metrics-powerstore -f Dockerfile --build-arg BASEIMAGE=$(DEFAULT_BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) . .PHONY: push push: