From 361cffbd12b5e253cfec0521bbd8473165cde449 Mon Sep 17 00:00:00 2001 From: Neo2308 Date: Thu, 31 Oct 2024 00:32:21 +0530 Subject: [PATCH] Fix other warnings * Fix "as" case mismatch warnings in dockerfiles * Fix "ENV" legacy format warnings in dockerfiles * Fix "set-output" deprecated warnings in github actions Signed-off-by: Neo2308 --- .github/workflows/deploy.yml | 6 +++--- .github/workflows/integration.yml | 2 +- .github/workflows/test-go.yml | 2 +- .github/workflows/test-helm.yml | 2 +- .github/workflows/test-sample-go.yml | 2 +- images/custom-scorecard-tests/Dockerfile | 2 +- images/helm-operator/Dockerfile | 2 +- images/operator-sdk/Dockerfile | 4 ++-- images/scorecard-test-kuttl/Dockerfile | 2 +- images/scorecard-test/Dockerfile | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3190a244aa5..863b71c96c3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: run: | REF="HEAD^" [[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) - echo "::set-output name=skip::$(.github/workflows/check-docs-only.sh $REF)" + echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT # Job to test release steps. This will only create a release remotely if run on a tagged commit. goreleaser: @@ -100,7 +100,7 @@ jobs: id: tags run: | IMG=quay.io/${{ github.repository_owner }}/${{ matrix.id }} - echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") + echo tags=$(.github/workflows/get_image_tags.sh "$IMG" "v") >> $GITHUB_OUTPUT - name: build and push uses: docker/build-push-action@v6 @@ -146,7 +146,7 @@ jobs: id: tags run: | IMG=quay.io/${{ github.repository_owner }}/scorecard-test-kuttl - echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "scorecard-kuttl/v") + echo tags=$(.github/workflows/get_image_tags.sh "$IMG" "scorecard-kuttl/v") >> $GITHUB_OUTPUT - name: build and push uses: docker/build-push-action@v6 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index fd63511fd2b..e402088bd8d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -18,7 +18,7 @@ jobs: run: | REF="HEAD^" [[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) - echo "::set-output name=skip::$(.github/workflows/check-docs-only.sh $REF)" + echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT integration: name: integration diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index f08524ed104..3b686274058 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -21,7 +21,7 @@ jobs: run: | REF="HEAD^" [[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) - echo "::set-output name=skip::$(.github/workflows/check-docs-only.sh $REF)" + echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT e2e: name: e2e diff --git a/.github/workflows/test-helm.yml b/.github/workflows/test-helm.yml index 557b248f9df..ab1160c1abe 100644 --- a/.github/workflows/test-helm.yml +++ b/.github/workflows/test-helm.yml @@ -18,7 +18,7 @@ jobs: run: | REF="HEAD^" [[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) - echo "::set-output name=skip::$(.github/workflows/check-docs-only.sh $REF)" + echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT e2e: name: e2e diff --git a/.github/workflows/test-sample-go.yml b/.github/workflows/test-sample-go.yml index 5873f5824ba..f1f117c064a 100644 --- a/.github/workflows/test-sample-go.yml +++ b/.github/workflows/test-sample-go.yml @@ -18,7 +18,7 @@ jobs: run: | REF="HEAD^" [[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) - echo "::set-output name=skip::$(.github/workflows/check-docs-only.sh $REF)" + echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT e2e: name: e2e diff --git a/images/custom-scorecard-tests/Dockerfile b/images/custom-scorecard-tests/Dockerfile index 95a81e0231c..5fc6942577d 100644 --- a/images/custom-scorecard-tests/Dockerfile +++ b/images/custom-scorecard-tests/Dockerfile @@ -1,5 +1,5 @@ # Build the custom-scorecard-tests binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder ARG TARGETARCH WORKDIR /workspace diff --git a/images/helm-operator/Dockerfile b/images/helm-operator/Dockerfile index 35036a7eea3..8e3c7eeca8d 100644 --- a/images/helm-operator/Dockerfile +++ b/images/helm-operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder ARG TARGETARCH WORKDIR /workspace diff --git a/images/operator-sdk/Dockerfile b/images/operator-sdk/Dockerfile index 775d998f16c..a47903b68c8 100644 --- a/images/operator-sdk/Dockerfile +++ b/images/operator-sdk/Dockerfile @@ -1,5 +1,5 @@ # Build the operator-sdk binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder ARG TARGETARCH WORKDIR /workspace @@ -19,7 +19,7 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/operator-sdk # Final image. FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 -ENV GO_VERSION 1.19 +ENV GO_VERSION=1.19 ARG TARGETARCH RUN microdnf install -y make gcc which tar gzip diff --git a/images/scorecard-test-kuttl/Dockerfile b/images/scorecard-test-kuttl/Dockerfile index 0c4f9d81d4c..0c38e0ab3ee 100644 --- a/images/scorecard-test-kuttl/Dockerfile +++ b/images/scorecard-test-kuttl/Dockerfile @@ -1,5 +1,5 @@ # Build the scorecard-test-kuttl binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder ARG TARGETARCH ARG BUILDPLATFORM diff --git a/images/scorecard-test/Dockerfile b/images/scorecard-test/Dockerfile index cf417394cb6..e3c49c5d3a4 100644 --- a/images/scorecard-test/Dockerfile +++ b/images/scorecard-test/Dockerfile @@ -1,5 +1,5 @@ # Build the scorecard-test binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder ARG TARGETARCH WORKDIR /workspace