Skip to content

Commit 9ef153d

Browse files
committed
Allow publishing a gensbom container
Publish `gensbom` container together with `trustd` and `xtask` containers so users do not need build it locally. Signed-off-by: Jiří Kučera <[email protected]>
1 parent f40941a commit 9ef153d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/actions/build-container/action.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ runs:
4444
containerfiles: |
4545
.github/scripts/Containerfile.xtask
4646
47+
- name: Build Image (gensbom)
48+
id: build-image-gensbom
49+
uses: redhat-actions/buildah-build@v2
50+
with:
51+
image: gensbom
52+
tags: ${{ inputs.image_tag }}
53+
envs: |
54+
TAG=${{ inputs.image_tag }}
55+
build-args: |
56+
tag=${{ inputs.image_tag }}
57+
platforms: linux/amd64, linux/arm64
58+
containerfiles: |
59+
etc/gensbom/Containerfile
60+
4761
- name: Check images created
4862
shell: bash
4963
run: buildah images
@@ -54,6 +68,7 @@ runs:
5468
run: |
5569
podman save --multi-image-archive trustd:${{ inputs.image_tag }} > trustd.tar
5670
podman save --multi-image-archive xtask:${{ inputs.image_tag }} > xtask.tar
71+
podman save --multi-image-archive gensbom:${{ inputs.image_tag }} > gensbom.tar
5772
5873
- uses: actions/upload-artifact@v4
5974
with:
@@ -66,3 +81,9 @@ runs:
6681
name: container-xtask
6782
path: xtask.tar
6883
if-no-files-found: error
84+
85+
- uses: actions/upload-artifact@v4
86+
with:
87+
name: container-gensbom
88+
path: gensbom.tar
89+
if-no-files-found: error

.github/workflows/release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ jobs:
157157
username: ${{ github.repository_owner }}
158158
password: ${{ secrets.GITHUB_TOKEN }}
159159

160+
- name: Push to ghcr.io (gensbom)
161+
uses: redhat-actions/push-to-registry@v2
162+
with:
163+
image: gensbom
164+
tags: ${{ needs.init.outputs.version }}
165+
registry: ghcr.io/${{ github.repository_owner }}
166+
username: ${{ github.repository_owner }}
167+
password: ${{ secrets.GITHUB_TOKEN }}
168+
160169
# Final step, create the GitHub release, attaching the files
161170

162171
- name: Create Release

0 commit comments

Comments
 (0)