Remove attestation

pull/2/head
Stefano Ortolani 2023-12-07 10:02:08 +00:00
parent 7089a87656
commit 98ba9c3e0d
4 changed files with 14 additions and 12 deletions

View File

@ -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: on:
push: push:
@ -27,10 +27,10 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
run: | run: |
sed -e '/^[[:space:]]*$/d' -e '/[#@]/d' -e 's/\"//g' -e 's/\(^[^=]*\)=\(.*\)/\1="\2"/' template.env > env.hcl 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 "COMMIT_HASH=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV"
echo "DOCKER_USERNAME=ghcr.io/misp/misp-docker" >> "$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 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
@ -41,4 +41,5 @@ jobs:
uses: docker/bake-action@v4 uses: docker/bake-action@v4
with: with:
push: true push: true
provenance: false
files: docker-bake.hcl, env.hcl files: docker-bake.hcl, env.hcl

View File

@ -23,11 +23,12 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
run: | run: |
sed -e '/^[[:space:]]*$/d' -e '/[#@]/d' -e 's/\"//g' -e 's/\(^[^=]*\)=\(.*\)/\1="\2"/' template.env > env.hcl 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 "COMMIT_HASH=`echo '${{ github.sha }}' | cut -c 1-7`" >> "$GITHUB_ENV"
echo "DOCKER_USERNAME=local" >> "$GITHUB_ENV" echo "NAMESPACE=local" >> "$GITHUB_ENV"
- name: Build - name: Build
uses: docker/bake-action@v4 uses: docker/bake-action@v4
with: with:
push: false push: false
rovenance: false
files: docker-bake.hcl, env.hcl files: docker-bake.hcl, env.hcl

View File

@ -38,11 +38,11 @@ variable "PYPI_PYMISP_VERSION" {
default = "" default = ""
} }
variable "DOCKER_USERNAME" { variable "NAMESPACE" {
default = null default = null
} }
variable "DOCKER_IMG_TAG" { variable "COMMIT_HASH" {
default = null default = null
} }
@ -80,7 +80,7 @@ group "default" {
target "misp-modules" { target "misp-modules" {
context = "modules/." context = "modules/."
dockerfile = "Dockerfile" 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 = { args = {
"MODULES_TAG": "${MODULES_TAG}", "MODULES_TAG": "${MODULES_TAG}",
"MODULES_COMMIT": "${MODULES_COMMIT}", "MODULES_COMMIT": "${MODULES_COMMIT}",
@ -92,7 +92,7 @@ target "misp-modules" {
target "misp" { target "misp" {
context = "server/." context = "server/."
dockerfile = "Dockerfile" 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 = { args = {
"MISP_TAG": "${MISP_TAG}", "MISP_TAG": "${MISP_TAG}",
"MISP_COMMIT": "${MISP_COMMIT}", "MISP_COMMIT": "${MISP_COMMIT}",

View File

@ -29,7 +29,7 @@ services:
- SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log - SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log
misp: misp:
image: ostefano/misp-docker:core-latest image: ghcr.io/misp/misp-docker/misp-docker:core-latest
build: build:
context: server/. context: server/.
args: args:
@ -88,7 +88,7 @@ services:
- "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}" - "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}"
misp-modules: misp-modules:
image: ostefano/misp-docker:modules-latest image: ghcr.io/misp/misp-docker/misp-docker:modules-latest
build: build:
context: modules/. context: modules/.
args: args: