From 88930bae41be15c695925aba419582dc441e569b Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 30 Jul 2020 15:42:28 +0300 Subject: [PATCH 01/13] Github action with muti-arch and multi docker file support. - Build and push to docker registry Dockerfile under linux/amd64,linux/s390x - Build and push to docker registry rhel.Dockerfile under linux/amd64,linux/s390x - Allow to configure with secrets DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_IMAGE, DOCKER_REPO - Same workflow for master and prs - Is able to push tags --- .dockerignore | 15 +++++ .github/workflows/build.yml | 127 +++++++++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 51 -------------- .github/workflows/pr.yaml | 43 ------------ .gitignore | 3 +- build/dockerfiles/Dockerfile | 80 +++++++++++++++++----- 6 files changed, 208 insertions(+), 111 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/pr.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3e35a38 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +/.idea +/*.iml + +/.dev +/.git +/.github +/.res +/bin +/dist +/doc +/vendor +/.gitattributes +/.gitignore +/CHANGELOG.md +/README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8e72811 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,127 @@ +name: build + +on: + push: + branches: + - 'master' + - 'v*' + tags: + - 'v*' + paths-ignore: + - '**.md' + pull_request: + branches: + - 'master' + - 'v*' + paths-ignore: + - '**.md' + +jobs: + + go: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2.3.1 + - + name: Prepare + id: prepare + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/} + fi + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.13 + - + name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - + name: Go mod + run: go mod download + - + name: Go test + run: go test -v ./... + docker: + runs-on: ubuntu-18.04 + needs: go + steps: + - + name: Checkout + uses: actions/checkout@v2.3.1 + - + name: Prepare + id: prepare + run: | + DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} + DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}} + DOCKER_REPO=${{secrets.DOCKER_REPO}} + DOCKER_PLATFORMS=linux/amd64,linux/s390x + VERSION=latest + + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + fi + + TAGS="--tag ${DOCKER_IMAGE}:${VERSION}" + TAGS_RHEL="--tag ${DOCKER_IMAGE}:${VERSION}-rhel" + + echo ::set-output name=docker_username::${DOCKER_USERNAME} + echo ::set-output name=docker_repo::${DOCKER_REPO} + echo ::set-output name=docker_image::${DOCKER_IMAGE} + echo ::set-output name=version::${VERSION} + echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg VERSION=${VERSION} \ + --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ + --build-arg VCS_REF=${GITHUB_SHA::8} \ + ${TAGS} --file build/dockerfiles/Dockerfile . + + echo ::set-output name=buildx_args_rhel::--platform linux/amd64 \ + --build-arg VERSION=${VERSION} \ + --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ + --build-arg VCS_REF=${GITHUB_SHA::8} \ + ${TAGS_RHEL} --file build/dockerfiles/rhel.Dockerfile . + - + name: Set up Docker Buildx + uses: crazy-max/ghaction-docker-buildx@v3.2.0 + with: + buildx-version: v0.4.1 + - + name: Docker Buildx (build) + run: | + docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} + - + name: Docker Login + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: | + echo "${DOCKER_PASSWORD}" | docker login ${{ steps.prepare.outputs.docker_repo }} --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin + - + name: Docker Buildx (push) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + run: | + docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} + - + name: Docker Buildx rhel (push) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + run: | + docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args_rhel }} + - + name: Docker Check Manifest + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + run: | + docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} + - + name: Clear + if: always() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) + run: | + rm -f ${HOME}/.docker/config.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index ae73f15..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (c) 2020 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -name: CI -# Trigger the workflow on push -on: - push: - branches: - - master -jobs: - docker-build: - runs-on: ubuntu-18.04 - strategy: - fail-fast: false - env: - IMAGE_FULL: quay.io/che-incubator/configbump:next - steps: - - uses: actions/checkout@v2 - name: Checkout configbump source code - - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v3.2.0 - with: - buildx-version: v0.4.1 - - name: Cache Docker layers - uses: actions/cache@v2 - id: cache - with: - path: /tmp/buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: "Docker Quay.io Login" - run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - - name: "Docker build with cache" - run: | - docker buildx build \ - --platform linux/amd64 \ - --cache-from "type=local,src=/tmp/buildx-cache" \ - --cache-to "type=local,dest=/tmp/buildx-cache" \ - --tag ${IMAGE_FULL} \ - --file build/dockerfiles/Dockerfile --push . - - name: Docker Logout - run: docker logout - - name: Clear - run: rm -f ${HOME}/.docker/config.json - diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index b180938..0000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2020 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -name: PR -# Trigger the workflow on push -on: - pull_request: - branches: [ master ] -jobs: - docker-build: - runs-on: ubuntu-18.04 - strategy: - fail-fast: false - env: - IMAGE_FULL: quay.io/eclipse/che-dashboard:next - steps: - - uses: actions/checkout@v2 - name: Checkout configbump source code - - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v3.2.0 - with: - buildx-version: v0.4.1 - - name: Cache Docker layers - uses: actions/cache@v2 - id: cache - with: - path: /tmp/buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: "Docker build with cache" - run: | - docker buildx build \ - --platform linux/amd64 \ - --cache-from "type=local,src=/tmp/buildx-cache" \ - --cache-to "type=local,dest=/tmp/buildx-cache" \ - --tag ${IMAGE_FULL} \ - --file build/dockerfiles/Dockerfile . diff --git a/.gitignore b/.gitignore index 66fd13c..b6619c6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out - +/.idea +/*.iml # Dependency directories (remove the comment below to include it) # vendor/ diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 6cfc6fb..3da1148 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -10,23 +10,71 @@ # Red Hat, Inc. - initial API and implementation # -FROM golang:1.13-alpine3.12 as builder -ENV CGO_ENABLED=0 -ENV GOOS=linux -RUN apk add --no-cache ca-certificates +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.13-alpine3.12 as builder + +ARG BUILD_DATE +ARG VCS_REF +ARG VERSION + +ARG TARGETPLATFORM +ARG BUILDPLATFORM +RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n" \ + && $(case ${TARGETPLATFORM:-linux/amd64} in \ + "linux/amd64") echo "GOOS=linux GOARCH=amd64" > /tmp/.env ;; \ + "linux/s390x") echo "GOOS=linux GOARCH=s390x" > /tmp/.env ;; \ + *) echo "TARGETPLATFORM ${TARGETPLATFORM} not found..." && exit 1 ;; \ + esac) \ + && cat /tmp/.env +RUN env $(cat /tmp/.env | xargs) go env + +RUN apk --update --no-cache add \ + build-base \ + gcc \ + git \ + && rm -rf /tmp/* /var/cache/apk/* RUN adduser -D -g '' appuser -WORKDIR /go/src/github.com/che-incubator/configbump -# copy go.mod go.sum -COPY go.mod go.sum ./ -# Get dependancies - will also be cached if we won't change mod/sum -RUN go mod download && go mod verify -COPY . /go/src/github.com/che-incubator/configbump -RUN go test -v ./... -RUN go build -a -ldflags '-w -s' -a -installsuffix cgo -o configbump cmd/configbump/main.go - -FROM alpine:3.12 +WORKDIR /app + +ENV GO111MODULE on +ENV GOPROXY https://goproxy.io +COPY go.mod . +COPY go.sum . +RUN env $(cat /tmp/.env | xargs) go mod download +COPY . ./ + +ARG VERSION=dev +RUN env $(cat /tmp/.env | xargs) go build -a -ldflags '-w -s' -a -installsuffix cgo -o configbump cmd/configbump/main.go + +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.12 + +ARG BUILD_DATE +ARG VCS_REF +ARG VERSION + +LABEL maintainer="Eclispe Che team" \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.url="https://github.com/che-incubator/configbump" \ + org.opencontainers.image.source="https://github.com/che-incubator/configbump" \ + org.opencontainers.image.version=$VERSION \ + org.opencontainers.image.revision=$VCS_REF \ + org.opencontainers.image.vendor="Eclispe Che team" \ + org.opencontainers.image.title="ConfigBump" \ + org.opencontainers.image.description="This is a simple Kubernetes controller that is able to quickly synchronize a set of configmaps (selected using labels) to files on local filesystem." \ + org.opencontainers.image.licenses="EPL 2.0" + +ENV EDITION_IDS="ConfigBump" + +RUN apk --update --no-cache add \ + ca-certificates \ + libressl \ + tzdata \ + && rm -rf /tmp/* /var/cache/apk/* + USER appuser +COPY --from=builder /app/configbump /usr/local/bin/configbump COPY --from=builder /etc/passwd /etc/passwd COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /go/src/github.com/che-incubator/configbump/configbump /usr/local/bin -ENTRYPOINT ["configbump"] +COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /usr/local/go/lib/time/zoneinfo.zip + +ENTRYPOINT [ "/usr/local/bin/configbump" ] + From 5bf811061d611739ff030fdd0494ae426d92d3da Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 07:39:07 +0300 Subject: [PATCH 02/13] Update build/dockerfiles/Dockerfile Co-authored-by: Serhii Leshchenko --- build/dockerfiles/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 3da1148..579b7a7 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -51,7 +51,7 @@ ARG BUILD_DATE ARG VCS_REF ARG VERSION -LABEL maintainer="Eclispe Che team" \ +LABEL maintainer="Eclipse Che team" \ org.opencontainers.image.created=$BUILD_DATE \ org.opencontainers.image.url="https://github.com/che-incubator/configbump" \ org.opencontainers.image.source="https://github.com/che-incubator/configbump" \ @@ -77,4 +77,3 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /usr/local/go/lib/time/zoneinfo.zip ENTRYPOINT [ "/usr/local/bin/configbump" ] - From ff3e5ecbb5bcbeb0deaf9f8bed1ea0c4f4fe8ce0 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 07:39:15 +0300 Subject: [PATCH 03/13] Update build/dockerfiles/Dockerfile Co-authored-by: Serhii Leshchenko --- build/dockerfiles/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 579b7a7..05ca293 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -57,7 +57,7 @@ LABEL maintainer="Eclipse Che team" \ org.opencontainers.image.source="https://github.com/che-incubator/configbump" \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.revision=$VCS_REF \ - org.opencontainers.image.vendor="Eclispe Che team" \ + org.opencontainers.image.vendor="Eclipse Che team" \ org.opencontainers.image.title="ConfigBump" \ org.opencontainers.image.description="This is a simple Kubernetes controller that is able to quickly synchronize a set of configmaps (selected using labels) to files on local filesystem." \ org.opencontainers.image.licenses="EPL 2.0" From adf53b10d523e3d74fd10f0b4eda6e07b1f1a0c3 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 11:18:30 +0300 Subject: [PATCH 04/13] More platforms --- .github/workflows/build.yml | 2 +- build/dockerfiles/Dockerfile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e72811..4310a5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}} DOCKER_REPO=${{secrets.DOCKER_REPO}} - DOCKER_PLATFORMS=linux/amd64,linux/s390x + DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest if [[ $GITHUB_REF == refs/tags/* ]]; then diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 3da1148..0d3b688 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -21,6 +21,11 @@ ARG BUILDPLATFORM RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n" \ && $(case ${TARGETPLATFORM:-linux/amd64} in \ "linux/amd64") echo "GOOS=linux GOARCH=amd64" > /tmp/.env ;; \ + "linux/arm/v6") echo "GOOS=linux GOARCH=arm GOARM=6" > /tmp/.env ;; \ + "linux/arm/v7") echo "GOOS=linux GOARCH=arm GOARM=7" > /tmp/.env ;; \ + "linux/arm64") echo "GOOS=linux GOARCH=arm64" > /tmp/.env ;; \ + "linux/386") echo "GOOS=linux GOARCH=386" > /tmp/.env ;; \ + "linux/ppc64le") echo "GOOS=linux GOARCH=ppc64le" > /tmp/.env ;; \ "linux/s390x") echo "GOOS=linux GOARCH=s390x" > /tmp/.env ;; \ *) echo "TARGETPLATFORM ${TARGETPLATFORM} not found..." && exit 1 ;; \ esac) \ From bd1e732221b85f0e9612bc2c73ce45386d287db0 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 15:49:46 +0300 Subject: [PATCH 05/13] Remove extra copy --- build/dockerfiles/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 360f9f6..2e1bc00 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -77,8 +77,5 @@ RUN apk --update --no-cache add \ USER appuser COPY --from=builder /app/configbump /usr/local/bin/configbump -COPY --from=builder /etc/passwd /etc/passwd -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /usr/local/go/lib/time/zoneinfo.zip ENTRYPOINT [ "/usr/local/bin/configbump" ] From 1ed13f6e0077d54c438cc41f8a28b4287caada09 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 16:30:29 +0300 Subject: [PATCH 06/13] Removed unused platforms --- build/dockerfiles/Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 2e1bc00..0995b42 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -21,10 +21,7 @@ ARG BUILDPLATFORM RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n" \ && $(case ${TARGETPLATFORM:-linux/amd64} in \ "linux/amd64") echo "GOOS=linux GOARCH=amd64" > /tmp/.env ;; \ - "linux/arm/v6") echo "GOOS=linux GOARCH=arm GOARM=6" > /tmp/.env ;; \ - "linux/arm/v7") echo "GOOS=linux GOARCH=arm GOARM=7" > /tmp/.env ;; \ "linux/arm64") echo "GOOS=linux GOARCH=arm64" > /tmp/.env ;; \ - "linux/386") echo "GOOS=linux GOARCH=386" > /tmp/.env ;; \ "linux/ppc64le") echo "GOOS=linux GOARCH=ppc64le" > /tmp/.env ;; \ "linux/s390x") echo "GOOS=linux GOARCH=s390x" > /tmp/.env ;; \ *) echo "TARGETPLATFORM ${TARGETPLATFORM} not found..." && exit 1 ;; \ @@ -77,5 +74,4 @@ RUN apk --update --no-cache add \ USER appuser COPY --from=builder /app/configbump /usr/local/bin/configbump - ENTRYPOINT [ "/usr/local/bin/configbump" ] From 0101a3e679c4c7cf148a5cc4bbd5322f39f4700d Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:18:20 +0300 Subject: [PATCH 07/13] Added license header --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4310a5a..4a7a0ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,15 @@ +# +# Copyright (c) 2020 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + name: build on: From 7894b2b7b23b1546acd522825e48b0f70760bf4e Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:27:21 +0300 Subject: [PATCH 08/13] Change defaults --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a7a0ef..73f97b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}} + DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}:-$GITHUB_REPOSITORY} DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest From 5afd16399da9f5bcc3c92f4d835e5a6bca85b17f Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:30:31 +0300 Subject: [PATCH 09/13] Change defaults --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73f97b2..f1b5974 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}:-$GITHUB_REPOSITORY} + DOCKER_IMAGE=${${{secrets.DOCKER_IMAGE}}:-$GITHUB_REPOSITORY} DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest From 7b9cbc8f3b7ae49624cdb5391ab9775f3288af9b Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:39:44 +0300 Subject: [PATCH 10/13] Test defaults --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1b5974..02f27c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${${{secrets.DOCKER_IMAGE}}:-$GITHUB_REPOSITORY} + DOCKER_IMAGE=${{secrets.DOCKER_IMAGE} DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest From 237ef819b7d8ec09b4b0cb3fff8ca2fabc55b614 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:42:50 +0300 Subject: [PATCH 11/13] Test defaults --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02f27c3..e1d17d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,8 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${{secrets.DOCKER_IMAGE} + DOCKER_IMAGE=${DOCKER_IMAGE:-$GITHUB_REPOSITORY} + echo $DOCKER_IMAGE DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest From 9ed2fa0da81bfbb7847a6b40398e29978469a7f2 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 17:56:49 +0300 Subject: [PATCH 12/13] Test defaults --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1d17d1..7c99e12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${DOCKER_IMAGE:-$GITHUB_REPOSITORY} + DOCKER_IMAGE=${${{secrets.DOCKER_IMAGE}}:-$GITHUB_REPOSITORY} echo $DOCKER_IMAGE DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le From 63fd27ee79d37a78808f12840f2281ebb1d38790 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Fri, 31 Jul 2020 18:00:47 +0300 Subject: [PATCH 13/13] Test defaults --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c99e12..2744efa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,8 +74,8 @@ jobs: id: prepare run: | DOCKER_USERNAME=${{secrets.DOCKER_USERNAME}} - DOCKER_IMAGE=${${{secrets.DOCKER_IMAGE}}:-$GITHUB_REPOSITORY} - echo $DOCKER_IMAGE + DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}} + DOCKER_IMAGE=${DOCKER_IMAGE:-$GITHUB_REPOSITORY} DOCKER_REPO=${{secrets.DOCKER_REPO}} DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le VERSION=latest