Skip to content

Commit

Permalink
Fix other warnings
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Neo2308 committed Oct 30, 2024
1 parent 3a70435 commit 1f99d42
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-sample-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions images/custom-scorecard-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,9 +19,9 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/custom-scorecard-tests
# Final image.
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10

ENV HOME=/opt/custom-scorecard-tests \
USER_NAME=custom-scorecard-tests \
USER_UID=1001
ENV HOME /opt/custom-scorecard-tests
ENV USER_NAME custom-scorecard-tests
ENV USER_UID 1001

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
8 changes: 4 additions & 4 deletions images/helm-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,9 +19,9 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/helm-operator
# Final image.
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10

ENV HOME=/opt/helm \
USER_NAME=helm \
USER_UID=1001
ENV HOME /opt/helm
ENV USER_NAME helm
ENV USER_UID 1001

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
2 changes: 1 addition & 1 deletion images/operator-sdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions images/scorecard-storage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM docker.io/busybox:1.36

## Create a new non-root user to run as
ENV HOME=/opt/scorecard-untar \
USER_NAME=scorecard-untar \
USER_UID=1001
ENV HOME /opt/scorecard-untar
ENV USER_NAME scorecard-untar
ENV USER_UID 1001

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
10 changes: 5 additions & 5 deletions images/scorecard-test-kuttl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -21,10 +21,10 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/scorecard-test-kuttl
#FROM kudobuilder/kuttl@sha256:8d4dad161521450db95f88fe0e62487cc6587c5818df2a4e750fb9e54c082170
FROM kudobuilder/kuttl:v0.15.0

ENV HOME=/opt/scorecard-test-kuttl \
USER_NAME=scorecard-test-kuttl \
USER_UID=1001 \
KUBECONFIG=
ENV HOME /opt/scorecard-test-kuttl
ENV USER_NAME scorecard-test-kuttl
ENV USER_UID 1001
ENV KUBECONFIG ""

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
8 changes: 4 additions & 4 deletions images/scorecard-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,9 +19,9 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/scorecard-test
# Final image.
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10

ENV HOME=/opt/scorecard-test \
USER_NAME=scorecard-test \
USER_UID=1001
ENV HOME /opt/scorecard-test
ENV USER_NAME scorecard-test
ENV USER_UID 1001

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
6 changes: 3 additions & 3 deletions images/scorecard-untar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM registry.access.redhat.com/ubi8:8.7

## Create a new non-root user to run as
ENV HOME=/opt/scorecard-untar \
USER_NAME=scorecard-untar \
USER_UID=1001
ENV HOME /opt/scorecard-untar
ENV USER_NAME scorecard-untar
ENV USER_UID 1001

RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (f *Dockerfile) SetTemplateDefaults() error {
const dockerfileTemplate = `# Build the manager binary
FROM quay.io/operator-framework/helm-operator:{{.HelmOperatorVersion}}
ENV HOME=/opt/helm
ENV HOME /opt/helm
COPY watches.yaml ${HOME}/watches.yaml
COPY helm-charts ${HOME}/helm-charts
WORKDIR ${HOME}
Expand Down
2 changes: 1 addition & 1 deletion testdata/helm/memcached-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build the manager binary
FROM quay.io/operator-framework/helm-operator:v1.37.0

ENV HOME=/opt/helm
ENV HOME /opt/helm
COPY watches.yaml ${HOME}/watches.yaml
COPY helm-charts ${HOME}/helm-charts
WORKDIR ${HOME}

0 comments on commit 1f99d42

Please sign in to comment.