File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
.github/actions/build-test Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 46
46
ansible-builder create -f ${{ github.workspace }}/execution-environment.yml --output-filename Containerfile -v3
47
47
48
48
- name : Build base image for ${{ matrix.platform }}
49
- uses : docker/build-push-action@v5
49
+ uses : docker/build-push-action@v6
50
50
id : build-base
51
51
with :
52
52
context : context
66
66
67
67
- name : Build final image for ${{ matrix.platform }}
68
68
id : build-final
69
- uses : docker/build-push-action@v5
69
+ uses : docker/build-push-action@v6
70
70
with :
71
71
context : ${{ github.workspace }}/final
72
72
provenance : false
80
80
cache-from : type=gha,scope=build-${{ env.PLATFORM_PAIR }}
81
81
cache-to : type=gha,scope=build-${{ env.PLATFORM_PAIR }}
82
82
83
+ - name : Squash image layers to save disk space
84
+ shell : bash
85
+ run : |
86
+ python3 -m pip install --upgrade docker-squash
87
+ docker-squash ${{ inputs.namespace }}/${{ inputs.final_image }}:test
88
+
83
89
- name : Run tests against the container
84
90
shell : bash
85
91
run : |
90
96
- name : Push the built image to ${{ inputs.registry }} by digest for ${{ matrix.platform }}
91
97
id : push-final
92
98
if : inputs.push == 'true'
93
- uses : docker/build-push-action@v5
99
+ uses : docker/build-push-action@v6
94
100
with :
95
101
context : ${{ github.workspace }}/final
96
102
provenance : false
Original file line number Diff line number Diff line change @@ -176,3 +176,4 @@ _readthedocs
176
176
177
177
# ansible-builder
178
178
context
179
+ collections
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ commands_pre =
122
122
commands =
123
123
python -m build --outdir {toxinidir}/final/dist/ --wheel {toxinidir}
124
124
ansible-builder create -f execution-environment.yml --output-filename Containerfile -v3
125
- podman build context/ --tag community-ansible-dev-tools-base:latest
126
- podman build final/ --tag community-ansible-dev-tools:test
125
+ podman build --squash-all context/ --tag community-ansible-dev-tools-base:latest
126
+ podman build --squash-all final/ --tag community-ansible-dev-tools:test
127
127
pytest --only-container --image-name community-ansible-dev-tools:test
128
128
allowlist_externals =
129
129
podman
You can’t perform that action at this time.
0 commit comments