diff --git a/.github/workflows/dockgen.yml b/.github/workflows/dockgen.yml new file mode 100644 index 00000000..82890fbc --- /dev/null +++ b/.github/workflows/dockgen.yml @@ -0,0 +1,53 @@ +name: "Publish docker image" + +on: + push: + branches: + - devel + tags: + - "v*" + +jobs: + dockgen: + runs-on: "ubuntu-latest" + permissions: + contents: read + packages: write + attestations: write + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v6 + - run: uvx dockgen + + # https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: ghcr.io/${{ github.repository }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 983c4b6c..f16c6023 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: rev: v0.24.2 hooks: - id: toml-sort-fix - exclude: pixi.toml + exclude: pixi.toml|dockgen.toml - repo: https://github.com/pre-commit/mirrors-clang-format rev: v20.1.7 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ba2cc2..bd14ced6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added + +- Docker images `ghcr.io/stack-of-tasks/eigenpy` ([#575](https://github.com/stack-of-tasks/eigenpy/pull/575)) + ### Changed - Change the default branch to `devel` ([#547](https://github.com/stack-of-tasks/eigenpy/pull/547)) diff --git a/README.md b/README.md index eb38e60e..c2e2f486 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ and then install **EigenPy** for Python 3.x with: brew install eigenpy ``` +### Docker + +``` +docker run --rm -it ghcr.io/stack-of-tasks/eigenpy:devel +``` + ## Build Build instruction can be found [here](./development/build.md) diff --git a/cmake b/cmake index 56b8f7e3..3632eb9e 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 56b8f7e3d09aa7cd81cb77be140753680e1c7f89 +Subproject commit 3632eb9ed43e29d7acbc5b35d30c9b2aee801702 diff --git a/dockgen.toml b/dockgen.toml new file mode 100644 index 00000000..bb5476cd --- /dev/null +++ b/dockgen.toml @@ -0,0 +1,7 @@ +[jrl-cmakemodules] +url = "github:jrl-umi3218" + +[eigenpy] +url = "." +apt_deps = ["libboost-all-dev", "libeigen3-dev", "python3-numpy", "python3-scipy"] +src_deps = ["jrl-cmakemodules"]