Skip to content

Build SecObserve docker image #2

Build SecObserve docker image

Build SecObserve docker image #2

name: Build and push dev images
on:
push:
branches:
- stackable
permissions:
id-token: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-
name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0
-
name: Login to Stackable Harbor
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # tag=v3
with:
registry: oci.stackable.tech
username: robot$stackable+github-action-build
password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
-
name: Set up Cosign
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # tag=v3.3.0
-
name: Set current date as env variable
run: echo "CREATED=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
-
name: Build and push backend
id: build-and-push-backend
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: .
file: ./docker/backend/prod/django/Dockerfile
push: true
tags: stackable/secobserve-backend:dev
build-args: |
CREATED=${{ env.CREATED }}
REVISION=${{ github.sha }}
VERSION=dev
-
name: Sign the published backend image
run: cosign sign -y oci.stackable.tech/stackable/secobserve-backend@${{ steps.build-and-push-backend.outputs.digest }}
-
name: Build and push frontend
id: build-and-push-frontend
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: .
file: ./docker/frontend/Dockerfile
push: truet
tags: stackable/secobserve-frontend:dev
build-args: |
CREATED=${{ env.CREATED }}
REVISION=${{ github.sha }}
VERSION=dev
-
name: Sign the published frontend image
run: cosign sign -y oci.stackable.tech/stackable/secobserve-frontend@${{ steps.build-and-push-backend.outputs.digest }}