Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
- 'releases/**'
tags:
- v*
pull_request:
branches:
- main
Expand Down Expand Up @@ -39,8 +41,9 @@ jobs:
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
push: true

outputs:
image: ${{ steps.meta.outputs.tags }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
push: true
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

FROM ${DIST}

LABEL maintainer="AnHeuermann"
LABEL description="Cross-compile C FMUs for Linux and Windows"
# Image / OCI metadata
LABEL maintainer "AnHeuermann"

Check warning on line 6 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL description "Cross-compile C FMUs for Linux and Windows"

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL organization "OpenModelica"

Check warning on line 8 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

LABEL org.opencontainers.image.vendor "OpenModelica"

Check warning on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.authors "AnHeuermann"

Check warning on line 11 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.version "v1.26.0-dev"

Check warning on line 12 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.description "Cross-compile C FMUs for Linux and Windows"

Check warning on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.source "https://github.com/OpenModelica/openmodelica-crossbuild/"

Check warning on line 14 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
LABEL org.opencontainers.image.license "AGPL VERSION 3 OR OSMC-PL VERSION 1.8"

Check warning on line 15 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Copy toolchain files
COPY toolchain/ /opt/cmake/toolchain/

# Install build dependencies
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ cmake --build build_linux64 --target create_fmu

## Upload

### Release Versions

The [publish.yml][gh-publish-file] workflow will build and
upload the Docker image to
[OpenModelica/crossbuild][docker-hub]
for each release.
[OpenModelica/crossbuild][docker-hub] DockerHub for each release.

To do it manually run:

Expand All @@ -79,6 +80,14 @@ docker image tag crossbuild:$TAG $REGISTRY/crossbuild:$TAG
docker push $REGISTRY/crossbuild:$TAG
```

### Development Versions

The [build.yml][gh-build-file] workflow uploads all tested image versions to
[GitHub container registry][gh-container-registry].

> [!CAUTION]
> Only download and run images you trust.

## License

This repository is part of OpenModelica and licensed with
Expand All @@ -94,5 +103,7 @@ This repository is part of OpenModelica and licensed with
[i686-w64-mingw32]: ./toolchain/i686-w64-mingw32.cmake
[x86_64-w64-mingw32]: ./toolchain/x86_64-w64-mingw32.cmake
[gh-publish-file]: ./.github/workflows/publish.yml
[gh-build-file]: ./.github/workflows/build.yml
[gh-container-registry]: https://github.com/OpenModelica/openmodelica-crossbuild/pkgs/container/crossbuild
[docker-hub]: https://hub.docker.com/repository/docker/OpenModelica/crossbuild
[osmc-license]: ./OSMC-License.txt