From 98ba9c3e0d5bcd38e6b2edd3881c0caeaa9e1d63 Mon Sep 17 00:00:00 2001 From: Stefano Ortolani Date: Thu, 7 Dec 2023 10:02:08 +0000 Subject: [PATCH] Remove attestation --- .github/workflows/release-latest.yml | 9 +++++---- .github/workflows/test-build-latest.yml | 5 +++-- docker-bake.hcl | 8 ++++---- docker-compose.yml | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-latest.yml b/.github/workflows/release-latest.yml index 2104f87..3b687e1 100644 --- a/.github/workflows/release-latest.yml +++ b/.github/workflows/release-latest.yml @@ -1,4 +1,4 @@ -name: Build the Docker images and push them to Docker Hub +name: Build the Docker images and push them to the container registry on: push: @@ -27,10 +27,10 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: | sed -e '/^[[:space:]]*$/d' -e '/[#@]/d' -e 's/\"//g' -e 's/\(^[^=]*\)=\(.*\)/\1="\2"/' template.env > env.hcl - echo "DOCKER_IMG_TAG=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV" - echo "DOCKER_USERNAME=ghcr.io/misp/misp-docker" >> "$GITHUB_ENV" + echo "COMMIT_HASH=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV" + echo "NAMESPACE=ghcr.io/misp/misp-docker" >> "$GITHUB_ENV" - - name: Log in to the Container registry + - name: Log in to the container registry uses: docker/login-action@v3 with: registry: ghcr.io @@ -41,4 +41,5 @@ jobs: uses: docker/bake-action@v4 with: push: true + provenance: false files: docker-bake.hcl, env.hcl diff --git a/.github/workflows/test-build-latest.yml b/.github/workflows/test-build-latest.yml index a9325c4..ea0baef 100644 --- a/.github/workflows/test-build-latest.yml +++ b/.github/workflows/test-build-latest.yml @@ -23,11 +23,12 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: | sed -e '/^[[:space:]]*$/d' -e '/[#@]/d' -e 's/\"//g' -e 's/\(^[^=]*\)=\(.*\)/\1="\2"/' template.env > env.hcl - echo "DOCKER_IMG_TAG=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV" - echo "DOCKER_USERNAME=local" >> "$GITHUB_ENV" + echo "COMMIT_HASH=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV" + echo "NAMESPACE=local" >> "$GITHUB_ENV" - name: Build uses: docker/bake-action@v4 with: push: false + rovenance: false files: docker-bake.hcl, env.hcl diff --git a/docker-bake.hcl b/docker-bake.hcl index 1a26f4c..de40805 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -38,11 +38,11 @@ variable "PYPI_PYMISP_VERSION" { default = "" } -variable "DOCKER_USERNAME" { +variable "NAMESPACE" { default = null } -variable "DOCKER_IMG_TAG" { +variable "COMMIT_HASH" { default = null } @@ -80,7 +80,7 @@ group "default" { target "misp-modules" { context = "modules/." dockerfile = "Dockerfile" - tags = flatten(["${DOCKER_USERNAME}/misp-docker:modules-latest", "${DOCKER_USERNAME}/misp-docker:modules-${DOCKER_IMG_TAG}", MODULES_TAG != "" ? ["${DOCKER_USERNAME}/misp-docker:modules-${MODULES_TAG}"] : []]) + tags = flatten(["${NAMESPACE}/misp-docker:modules-latest", "${NAMESPACE}/misp-docker:modules-${COMMIT_HASH}", MODULES_TAG != "" ? ["${NAMESPACE}/misp-docker:modules-${MODULES_TAG}"] : []]) args = { "MODULES_TAG": "${MODULES_TAG}", "MODULES_COMMIT": "${MODULES_COMMIT}", @@ -92,7 +92,7 @@ target "misp-modules" { target "misp" { context = "server/." dockerfile = "Dockerfile" - tags = flatten(["${DOCKER_USERNAME}/misp-docker:core-latest", "${DOCKER_USERNAME}/misp-docker:core-${DOCKER_IMG_TAG}", MISP_TAG != "" ? ["${DOCKER_USERNAME}/misp-docker:core-${MISP_TAG}"] : []]) + tags = flatten(["${NAMESPACE}/misp-docker:core-latest", "${NAMESPACE}/misp-docker:core-${COMMIT_HASH}", MISP_TAG != "" ? ["${NAMESPACE}/misp-docker:core-${MISP_TAG}"] : []]) args = { "MISP_TAG": "${MISP_TAG}", "MISP_COMMIT": "${MISP_COMMIT}", diff --git a/docker-compose.yml b/docker-compose.yml index e77b013..e950d88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: - SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log misp: - image: ostefano/misp-docker:core-latest + image: ghcr.io/misp/misp-docker/misp-docker:core-latest build: context: server/. args: @@ -88,7 +88,7 @@ services: - "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}" misp-modules: - image: ostefano/misp-docker:modules-latest + image: ghcr.io/misp/misp-docker/misp-docker:modules-latest build: context: modules/. args: