@@ -17,263 +17,11 @@ particular step in a workflow.
17
17
| Image Repo Digest | ` docker.stackable.tech/stackable/kafka@sha256:917f800259ef4915f976... ` |
18
18
| Digest | ` sha256:917f800259ef4915f976e93987b752fd64debf347568610d7f685d2022... ` |
19
19
20
- ## ` build-container-image `
21
-
22
- > Manifest: [ build-container-image/action.yml] [ build-container-image ]
23
-
24
- This action builds a * single* container image using ` docker buildx build ` . It does the following work:
25
-
26
- 1 . Free disk space to avoid running out of disk space during larger builds.
27
- 2 . Build the image using ` docker buildx build ` , outputting the architecture specific tag.
28
-
29
- This action is considered to be the ** single** source of truth regarding the image manifest tag.
30
- All subsequent tasks must use this value to ensure consistency.
31
-
32
- ### Inputs and Outputs
33
-
34
- > [ !TIP]
35
- > For descriptions of the inputs and outputs, see the complete [ build-container-image] action.
36
-
37
- #### Inputs
38
-
39
- - ` image-name ` (eg: ` kafka ` )
40
- - ` image-index-manifest-tag ` (eg: ` 3.4.1-stackable0.0.0-dev ` )
41
- - ` container-file ` (defaults to ` Dockerfile ` )
42
- - ` build-context ` (defaults to ` . ` )
43
- <!--
44
- TODO (@NickLarsenNZ): Allow optional buildx cache
45
- - `build-cache-username`
46
- - `build-cache-password`
47
- -->
48
-
49
- #### Outputs
50
-
51
- - ` image-repository-uri ` (eg: ` localhost/kafka ` )
52
- - ` image-manifest-tag ` (eg: ` 3.4.1-stackable0.0.0-dev-amd64 ` )
53
- - ` image-manifest-uri ` (eg: ` localhost/kafka:3.4.1-stackable0.0.0-dev-amd64 ` )
54
-
55
- [ build-container-image ] : ./build-container-image/action.yml
56
-
57
- ## ` build-product-image `
58
-
59
- > Manifest: [ build-product-image/action.yml] [ build-product-image ]
60
-
61
- <!-- markdownlint-disable-next-line MD028 -->
62
- > [ !NOTE]
63
- > The build step is not concerned with registries, ports, paths to repositories, but still requires
64
- > a name. If the name does not contain a registry, ` hub.docker.com ` (?) is implied. Therefore,
65
- > ` localhost ` will be used as the registry so as to avoid accidental interactions with an unintended
66
- > registry.
67
- >
68
- > Ideally, bake should be refactored to use ` localhost ` as the registry for the previously mentioned
69
- > reason (whether or not that is behind some option).
70
-
71
- This action builds a * single* container image using ` bake ` . It does the following work:
72
-
73
- 1 . Free disk space to avoid running out of disk space during larger builds.
74
- 2 . Build the image using ` bake ` which internally uses ` docker buildx ` .
75
- 3 . Temporarily retag the image to use ` localhost ` instead of ` docker.stackable.tech/stackable ` .
76
- 4 . Produce output values to be used in later steps.
77
-
78
- This action is considered to be the ** single** source of truth regarding image index tag and image
79
- manifest tag. All subsequent tasks must use these values to ensure consistency.
80
-
81
- Currently, bake provides the following ouput in the ` bake-target-tags ` file:
82
-
83
- ``` plain
84
- docker.stackable.tech/stackable/kafka:3.4.1-stackable0.0.0-dev-amd64
85
- ```
86
-
87
- Until bake supports the ability to specify the registry, this action will retag the image as:
88
-
89
- ``` plain
90
- localhost/kafka:3.4.1-stackable0.0.0-dev-amd64
91
- ```
92
-
93
- ### Inputs and Outputs
94
-
95
- > [ !TIP]
96
- > For descriptions of the inputs and outputs, see the complete [ build-product-image] action.
97
-
98
- #### Inputs
99
-
100
- - ` product-name `
101
- - ` product-version `
102
- - ` image-tools-version `
103
- - ` build-cache-username `
104
- - ` build-cache-password `
105
-
106
- #### Outputs
107
-
108
- - ` image-manifest-tag `
109
-
110
- [ build-product-image ] : ./build-product-image/action.yml
111
-
112
- ## ` publish-image `
113
-
114
- > Manifest: [ publish-image/action.yml] [ publish-image ]
115
-
116
- This action signs and publishes a * single* container image to the given registry. It does the
117
- following work:
118
-
119
- 1 . Tag the ` source-image-uri ` with the specified ` image-registry-uti ` , ` image-repository ` , and
120
- ` image-repository ` .
121
- 2 . Push the container image to the specified registry.
122
- 3 . Sign the container image (which pushes the signature to the specified registry).
123
- 4 . Generate an SBOM via a syft scan.
124
- 5 . Attest an image with the SBOM as a predicate (which pushes the attestation to the specified
125
- registry).
126
-
127
- ### Inputs and Outputs
128
-
129
- > [ !TIP]
130
- > For descriptions of the inputs and outputs, see the complete [ publish-image] action.
131
-
132
- <!-- markdownlint-disable-next-line MD028 -->
133
- > [ !IMPORTANT]
134
- > For multi-arch images, the ` image-manifest-tag ` should have the ` -$ARCH ` suffix, as the tag
135
- > without it should be reserved for the image index manifest which will refer to container images
136
- > for each architecture we will push images for.
137
-
138
- #### Inputs
139
-
140
- - ` image-registry-uri `
141
- - ` image-registry-username `
142
- - ` image-registry-password `
143
- - ` image-repository `
144
- - ` image-manifest-tag `
145
- - ` source-image-uri `
146
-
147
- #### Outputs
148
-
149
- None
150
-
151
- [ publish-image ] : ./publish-image/action.yml
152
-
153
- ## ` publish-index-manifest `
154
-
155
- > Manifest: [ publish-index-manifest/action.yml] [ publish-index-manifest ]
156
-
157
- This action creates an image index manifest, publishes it, and signs it. It does the following work:
158
-
159
- 1 . Create an image index manifest and link to each architecture in ` image-architectures ` .
160
- 2 . Push the image index manifest.
161
- 3 . Sign the image index manifest (which pushes the signature to the specified registry).
162
-
163
- ### Inputs and Outputs
164
-
165
- > [ !TIP]
166
- > For descriptions of the inputs and outputs, see the complete [ publish-index-manifest] action.
167
-
168
- #### Inputs
169
-
170
- - ` image-registry-uri `
171
- - ` image-registry-username `
172
- - ` image-registry-password `
173
- - ` image-repository `
174
- - ` image-index-manifest-tag `
175
- - ` image-architectures `
176
-
177
- #### Outputs
178
-
179
- None
180
-
181
- [ publish-index-manifest ] : ./publish-index-manifest/action.yml
182
-
183
- ## ` run-pre-commit `
184
-
185
- > Manifest: [ run-pre-commit/action.yml] [ run-pre-commit ]
186
-
187
- This action runs pre-commit by setting up Python and optionally the Rust toolchain and Hadolint in
188
- the requested version. It requires a checkout with depth 0. It does the following work:
189
-
190
- 1 . Installs Python. The version can be configured via the ` python-version ` input.
191
- 2 . Optionally sets up the Rust toolchain and Hadolint.
192
- 3 . Runs pre-commit on changed files.
193
-
194
- Example usage (workflow):
195
-
196
- ``` yaml
197
- ---
198
- name : pre-commit
199
-
200
- on :
201
- pull_request :
202
-
203
- jobs :
204
- pre-commit :
205
- runs-on : ubuntu-latest
206
- steps :
207
- - uses : actions/checkout
208
- with :
209
- fetch-depth : 0
210
- submodules : recursive
211
- - uses : stackabletech/actions/run-pre-commit
212
- ` ` `
213
-
214
- ### Inputs and Outputs
215
-
216
- > [!TIP]
217
- > For descriptions of the inputs and outputs, see the complete [run-pre-commit] action.
218
-
219
- #### Inputs
220
-
221
- - ` python-version`
222
- - ` rust`
223
- - ` rust-components`
224
- - ` hadolint`
225
-
226
- # ### Outputs
227
-
228
- None
229
-
230
- [run-pre-commit] : ./run-pre-commit/action.yml
231
-
232
- # # `shard`
233
-
234
- > Manifest: [shard/action.yml][shard]
235
-
236
- This action produces a list of versions for a product. This is to be used as a matrix dimension to
237
- parallelize builds. It does the following work :
238
-
239
- 1. Reads the `conf.py`, filtering versions for the product
240
- 2. Write the JSON array of version to `$GITHUB_OUTPUT` for use in a matrix.
241
-
242
- Example usage :
243
-
244
- ` ` ` yaml
245
- jobs:
246
- generate_matrix:
247
- name: Generate Version List
248
- runs-on: ubuntu-latest
249
- steps:
250
- - uses: actions/checkout
251
- - id: shard
252
- uses: stackabletech/actions/shard
253
- with:
254
- product-name: ${{ env.PRODUCT_NAME }}
255
- outputs:
256
- versions: ${{ steps.shard.outputs.versions }}
257
-
258
- actual_matrix:
259
- needs: [generate_matrix]
260
- strategy:
261
- matrix:
262
- versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
263
- # ...
264
- ` ` `
265
-
266
- # ## Inputs and Outputs
267
-
268
- > [!TIP]
269
- > For descriptions of the inputs and outputs, see the complete [shard] action.
270
-
271
- # ### Inputs
272
-
273
- - ` product-name`
274
-
275
- # ### Outputs
276
-
277
- - ` versions`
278
-
279
- [shard] : ./publish-index-manifest/action.yml
20
+ ## Available Actions
21
+
22
+ - [ build-container-image] ( ./build-container-image/README.md )
23
+ - [ build-product-image] ( ./build-product-image/README.md )
24
+ - [ publish-image] ( ./publish-image/README.md )
25
+ - [ publish-index-manifest] ( ./publish-index-manifest/README.md )
26
+ - [ run-pre-commit] ( ./run-pre-commit/README.md )
27
+ - [ shard] ( ./shard/README.md )
0 commit comments