Skip to content

Temporarily disable docker actions limitation (now it builds on all b… #73

Temporarily disable docker actions limitation (now it builds on all b…

Temporarily disable docker actions limitation (now it builds on all b… #73

Workflow file for this run

name: Docker Image CI
on:
push:
# branches:
# - 'main'
env:
OPENSUT_BASE_IMAGE_ID: ghcr.io/galoisinc/verse-opensut/opensut-base:latest
CERBERUS_HARDENED_IMAGE_ID: ghcr.io/galoisinc/verse-opensut/cn-hardened:1.3
jobs:
opensut-base:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
- name: Build the Docker image
run: |
echo "Building ${{env.OPENSUT_BASE_IMAGE_ID}}"
docker build . --file Dockerfile --tag ${{env.OPENSUT_BASE_IMAGE_ID}}
- name: Push the Docker image
run: docker push ${{env.OPENSUT_BASE_IMAGE_ID}}
hardened-cerberus:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init src/cerberus
ls -l src/cerberus
- name: Login to Iron Bank Container Registry
uses: docker/login-action@v3
with:
registry: registry1.dso.mil
username: ${{ secrets.IRONBANK_USERNAME }}
password: ${{ secrets.IRONBANK_TOKEN }}
- name: Pull the hardended RedHat image
run: |
docker pull registry1.dso.mil/ironbank/redhat/ubi/ubi9:9.4
docker images
- name: Replace the regular RedHat image with the Iron Bank one
run: |
head src/cerberus/Dockerfile.redhat
sed -i 's/redhat\/ubi9\:9\.4/registry1\.dso\.mil\/ironbank\/redhat\/ubi\/ubi9\:9\.4/g' src/cerberus/Dockerfile.redhat
head src/cerberus/Dockerfile.redhat
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
- name: Build the Docker image
run: |
echo "Building ${{env.CERBERUS_HARDENED_IMAGE_ID}}"
cd src/cerberus
docker buildx build --tag ${{env.CERBERUS_HARDENED_IMAGE_ID}} --attest type=sbom --provenance=mode=max --push -f Dockerfile.redhat .