From 64975cac426e7a6c6cf19ab5e5c643cfd3801e29 Mon Sep 17 00:00:00 2001 From: Andrey Pokhilko Date: Sat, 10 Jun 2023 17:56:30 +0100 Subject: [PATCH] Build and release ARM docker images (#367) * Build and release ARM docker images * Build and release ARM docker images * Build and release ARM docker images * Build and release ARM docker images --- .github/workflows/build.yml | 8 +++++--- .github/workflows/release.yaml | 8 +++++++- Dockerfile | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 183b1c96..25f2fd6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,11 @@ name: Build on: push: - branches: main + branches: + - main pull_request: - branches: "*" + branches: + - "*" jobs: build: @@ -52,7 +54,7 @@ jobs: uses: actions/checkout@v3 - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . outputs: local diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0a7e6402..ac9591d6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,6 +62,11 @@ jobs: with: images: komodorio/helm-dashboard + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub uses: docker/login-action@v1 if: github.event_name != 'pull_request' @@ -70,7 +75,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PASS }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 if: github.event_name != 'pull_request' with: context: . @@ -78,6 +83,7 @@ jobs: tags: komodorio/helm-dashboard:${{ needs.pre_release.outputs.release_tag }},komodorio/helm-dashboard:latest labels: ${{ steps.meta.outputs.labels }} build-args: VER=${{ needs.pre_release.outputs.release_tag }} + platforms: linux/amd64,linux/arm64 publish_chart: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 6f13e7ab..434f61ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/ RUN trivy --version # Checkov scanner -RUN pip3 install checkov packaging==21.3 && checkov --version +RUN (pip3 install checkov packaging==21.3 && checkov --version) || echo Failed to install optional Checkov COPY --from=builder /build/src/bin/dashboard /bin/helm-dashboard