Update go version to 1.23 (#180) #669
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workflow | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
sanitize: | |
name: Check for forbidden words | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Run the forbidden words scan | |
uses: dell/common-github-actions/code-sanitizer@main | |
with: | |
args: /github/workspace | |
go_security_scan_repctl: | |
permissions: write-all | |
name: Go security - Repctl | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Download GoSec | |
run: cd ./repctl && wget https://github.com/securego/gosec/releases/download/v2.19.0/gosec_2.19.0_linux_amd64.tar.gz | |
- name: Unpack GoSec | |
run: cd ./repctl && tar xzf gosec_2.19.0_linux_amd64.tar.gz | |
- name: GoSec scan | |
run: cd ./repctl && ./gosec ./... | |
image_security_scan: | |
name: Image Scanner | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{ github.sha }} | |
CONTAINER_TOOL: docker | |
PASSED_BUILD: false | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Build CSM Replication Docker Images | |
run: | | |
chmod +x ./scripts/build-ubi-micro.sh | |
make build-base-image | |
: # dell-csi-replicator | |
podman build . -t docker.io/dell-csi-replicator:${{ env.VERSION }} -f ./Dockerfiles/Dockerfile --target sidecar --build-arg GOIMAGE=golang:latest --build-arg BASEIMAGE="localhost/rep-ubimicro" | |
podman save docker.io/library/dell-csi-replicator:${{ env.VERSION }} -o /tmp/dell-csi-replicator.tar | |
docker load -i /tmp/dell-csi-replicator.tar | |
: # dell-replication-controller | |
podman build . -t docker.io/dell-replication-controller:${{ env.VERSION }} -f ./Dockerfiles/Dockerfile --target controller --build-arg GOIMAGE=golang:latest --build-arg BASEIMAGE="localhost/rep-ubimicro" | |
podman save docker.io/library/dell-replication-controller:${{ env.VERSION }} -o /tmp/dell-replication-controller.tar | |
docker load -i /tmp/dell-replication-controller.tar | |
: # dell-csi-migrator | |
podman build . -t docker.io/dell-csi-migrator:${{ env.VERSION }} -f ./Dockerfiles/Dockerfile --target migrator --build-arg GOIMAGE=golang:latest --build-arg BASEIMAGE="localhost/rep-ubimicro" | |
podman save docker.io/library/dell-csi-migrator:${{ env.VERSION }} -o /tmp/dell-csi-migrator.tar | |
docker load -i /tmp/dell-csi-migrator.tar | |
: # dell-csi-node-rescanner | |
podman build . -t docker.io/dell-csi-node-rescanner:${{ env.VERSION }} -f ./Dockerfiles/Dockerfile --target node-rescanner --build-arg GOIMAGE=golang:latest --build-arg BASEIMAGE="localhost/rep-ubimicro" | |
podman save docker.io/library/dell-csi-node-rescanner:${{ env.VERSION }} -o /tmp/dell-csi-node-rescanner.tar | |
docker load -i /tmp/dell-csi-node-rescanner.tar | |
if [ $? -eq 0 ]; then { echo "PASSED_BUILD=true" >> $GITHUB_ENV; } fi | |
- name: Scan dell-csi-replicator Docker Image | |
if: always() && env.PASSED_BUILD | |
uses: Azure/container-scan@v0 | |
with: | |
image-name: dell-csi-replicator:${{ env.VERSION }} | |
severity-threshold: HIGH | |
run-quality-checks: false | |
- name: Scan dell-replication-controller Docker Image | |
if: always() && env.PASSED_BUILD | |
uses: Azure/container-scan@v0 | |
with: | |
image-name: dell-replication-controller:${{ env.VERSION }} | |
severity-threshold: HIGH | |
run-quality-checks: false | |
- name: Scan dell-csi-migrator Docker Image | |
if: always() && env.PASSED_BUILD | |
uses: Azure/container-scan@v0 | |
with: | |
image-name: dell-csi-migrator:${{ env.VERSION }} | |
severity-threshold: HIGH | |
run-quality-checks: false | |
- name: Scan dell-csi-node-rescanner Docker Image | |
if: always() && env.PASSED_BUILD | |
uses: Azure/container-scan@v0 | |
with: | |
image-name: dell-csi-node-rescanner:${{ env.VERSION }} | |
severity-threshold: HIGH | |
run-quality-checks: false |