Skip to content

Commit

Permalink
Add support for multi-platform images
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Dostert committed May 27, 2024
1 parent 4631789 commit c673bf1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ All notable changes will be documented in this file in accordance with

## \[2.0.0] - 2024-05-27

### Added

- Support for building multi-platform images via `platformsCsv` input

### Changed

- Authentication configuration is now provided via `authConfig` (in the same format as dockers config.json) in order to ease usage for docker users.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ op:
# cacheDir: /default_cache
# context: /default_context
# contextIgnore: /default_context_ignore
# platformsCsv: ""
outputs:
image:
```
Expand Down
9 changes: 9 additions & 0 deletions op.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ inputs:
instructions:
file:
description: build instructions in the format of a Containerfile/Dockerfile
platformsCsv:
string:
default: ''
description: |
Platforms the image will be built for in the form of comma separated [platform specifiers](https://github.com/containerd/containerd/blob/8686ededfc90076914c5238eb96c883ea093a8ba/platforms/platforms.go#L63)
e.g. 'linux/amd64,linux/arm64'
outputs:
image:
dir:
Expand All @@ -61,6 +69,7 @@ run:
--output type=oci,tar=false,dest=/image
--import-cache type=local,src=/cacheDir
--export-cache type=local,dest=/cacheDir,mode=max
--opt platform=$(platformsCsv)
dirs:
/buildContext: $(context)
/cacheDir: $(cacheDir)
Expand Down

0 comments on commit c673bf1

Please sign in to comment.