File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ jobs:
122
122
uses : ./melange-src/.github/actions/setup-bubblewrap
123
123
- if : matrix.runner == 'bubblewrap'
124
124
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 }}
126
126
127
127
- name : Download kernel for VMs
128
128
if : matrix.runner == 'qemu'
@@ -153,9 +153,18 @@ jobs:
153
153
QEMU_KERNEL_IMAGE=/tmp/kernel/boot/vmlinuz-virt \
154
154
QEMU_KERNEL_MODULES=/tmp/kernel/lib/modules/ \
155
155
MELANGE="/usr/bin/melange" \
156
- MELANGE_EXTRA_OPTS="--runner qemu" \
156
+ MELANGE_EXTRA_OPTS="--runner qemu --generate-provenance " \
157
157
package/${{ matrix.package }}
158
158
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
+
159
168
- name : Run tests to verify xattrs with bubblewrap runner
160
169
if : matrix.runner == 'bubblewrap' && matrix.package == 'fping'
161
170
run : |
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ melange build [flags]
45
45
--empty-workspace whether the build workspace should be empty
46
46
--env-file string file to use for preloaded environment variables
47
47
--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)
48
49
--git-commit string commit hash of the git repository containing the build config file (defaults to detecting HEAD)
49
50
--git-repo-url string URL of the git repository containing the build config file (defaults to detecting from configured git remotes)
50
51
-h, --help help for build
You can’t perform that action at this time.
0 commit comments