Skip to content

Commit 3d52e55

Browse files
committed
Update docs; generate provenance in CI
Signed-off-by: egibs <[email protected]>
1 parent eb7a6d1 commit 3d52e55

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/wolfi-presubmit.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
uses: ./melange-src/.github/actions/setup-bubblewrap
123123
- if: matrix.runner == 'bubblewrap'
124124
run: |
125-
make SHELL="/bin/bash" MELANGE="sudo melange" MELANGE_RUNNER="bubblewrap" package/${{ matrix.package }}
125+
make SHELL="/bin/bash" MELANGE="sudo melange" MELANGE_RUNNER="bubblewrap" MELANGE_EXTRA_OPTS="--generate-provenance" package/${{ matrix.package }}
126126
127127
- name: Download kernel for VMs
128128
if: matrix.runner == 'qemu'
@@ -153,9 +153,18 @@ jobs:
153153
QEMU_KERNEL_IMAGE=/tmp/kernel/boot/vmlinuz-virt \
154154
QEMU_KERNEL_MODULES=/tmp/kernel/lib/modules/ \
155155
MELANGE="/usr/bin/melange" \
156-
MELANGE_EXTRA_OPTS="--runner qemu" \
156+
MELANGE_EXTRA_OPTS="--runner qemu --generate-provenance" \
157157
package/${{ matrix.package }}
158158
159+
- name: Output SLSA provenance
160+
run: |
161+
for pkg in packages/x86_64/*.apk; do
162+
dir="$(basename ${pkg} .apk)"
163+
mkdir -p packages/x86_64/"${dir}"
164+
sudo tar --xattrs --xattrs-include='*.*' -xf "${pkg}" -C packages/x86_64/"${dir}"
165+
jq . packages/x86_64/"${dir}"/.PROVENANCE
166+
done
167+
159168
- name: Run tests to verify xattrs with bubblewrap runner
160169
if: matrix.runner == 'bubblewrap' && matrix.package == 'fping'
161170
run: |

docs/md/melange_build.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ melange build [flags]
4545
--empty-workspace whether the build workspace should be empty
4646
--env-file string file to use for preloaded environment variables
4747
--generate-index whether to generate APKINDEX.tar.gz (default true)
48+
--generate-provenance generate SLSA provenance for builds (included as a .PROVENANCE file in the final APK)
4849
--git-commit string commit hash of the git repository containing the build config file (defaults to detecting HEAD)
4950
--git-repo-url string URL of the git repository containing the build config file (defaults to detecting from configured git remotes)
5051
-h, --help help for build

0 commit comments

Comments
 (0)