Skip to content

Commit d5ef210

Browse files
committed
[comment] test comparison pulls
1 parent 8781ed2 commit d5ef210

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/docker.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ jobs:
175175
core.exportVariable('WORKFLOW_CREATE_README', (opt.input?.readme === undefined) ? false : opt.input.readme);
176176
core.exportVariable('WORKFLOW_GRYPE_FAIL_ON_SEVERITY', (opt.dot?.grype?.fail === undefined) ? true : opt.dot.grype.fail);
177177
core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
178+
if(opt.dot?.readme?.comparison){
179+
core.exportVariable('WORKFLOW_CREATE_COMPARISON', true);
180+
core.exportVariable('WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE', opt.dot.readme.comparison.image);
181+
core.exportVariable('WORKFLOW_CREATE_COMPARISON_IMAGE', `${docker.image.name}:${docker.app.version}`);
182+
}
178183
179184
180185
@@ -335,9 +340,21 @@ jobs:
335340
# README
336341
- name: github / checkout master
337342
continue-on-error: true
338-
run: |
343+
run: |
344+
git pull
339345
git checkout master
340346
347+
- name: docker / setup comparison images
348+
if: env.WORKFLOW_CREATE_COMPARISON == 'true'
349+
continue-on-error: true
350+
run: |
351+
docker image prune -af
352+
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}
353+
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}
354+
docker image ls &> ./docker.image.ls
355+
echo "${PWD}"
356+
cat ./docker.image.ls
357+
341358
- name: github / create README.md
342359
id: github-readme
343360
continue-on-error: true

.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"11notes/distroless",
2020
"11notes/distroless:curl"
2121
]
22+
},
23+
"comparison":{
24+
"image":"traefik:3.3.5"
2225
}
2326
}
2427
}

project.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ${{ github:> }}* This image has no shell since it is 100% distroless, most other
88
${{ github:> }}* This image is created via a secure, pinned CI/CD process and immune to upstream attacks, most other images have upstream dependencies that can be exploited
99
${{ github:> }}* This image contains a proper health check that verifies the app is actually working, most other images have either no health check or only check if a port is open or ping works
1010
${{ github:> }}* This image works as read-only, most other images need to write files to the image filesystem
11+
${{ github:> }}* This image is up to 75% smaller than most other images
1112

1213
If you value security, simplicity and the ability to interact with the maintainer and developer of an image. Using my images is a great start in that direction.
1314

0 commit comments

Comments
 (0)