Skip to content

Commit 0933f53

Browse files
authored
Merge pull request #235 from codelion/fix-docker
Fix docker
2 parents 3606401 + 5233292 commit 0933f53

File tree

2 files changed

+9
-129
lines changed

2 files changed

+9
-129
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -28,73 +28,13 @@ jobs:
2828
- name: Publish package distributions to PyPI
2929
uses: pypa/gh-action-pypi-publish@release/v1
3030

31-
# AMD64 Docker build job
32-
docker-build-amd64:
33-
name: Build Docker image (AMD64)
31+
docker-publish:
32+
name: Build and publish Docker image
3433
runs-on: ubuntu-latest
3534
needs: pypi-publish
3635
permissions:
3736
contents: read
3837
packages: write
39-
outputs:
40-
digest: ${{ steps.build.outputs.digest }}
41-
metadata: ${{ steps.meta.outputs.json }}
42-
steps:
43-
- name: Checkout
44-
uses: actions/checkout@v4
45-
46-
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@v3
48-
49-
- name: Log in to GitHub Container Registry
50-
uses: docker/login-action@v3
51-
with:
52-
registry: ghcr.io
53-
username: ${{ github.actor }}
54-
password: ${{ secrets.GITHUB_TOKEN }}
55-
56-
- name: Extract metadata
57-
id: meta
58-
uses: docker/metadata-action@v5
59-
with:
60-
images: ghcr.io/${{ github.repository }}
61-
tags: |
62-
type=semver,pattern={{version}}
63-
type=semver,pattern={{major}}.{{minor}}
64-
type=raw,value=latest
65-
labels: |
66-
org.opencontainers.image.title=OpenEvolve
67-
org.opencontainers.image.description=Open-source evolutionary coding agent
68-
org.opencontainers.image.vendor=OpenEvolve
69-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
70-
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme
71-
org.opencontainers.image.licenses=Apache-2.0
72-
73-
- name: Build and push AMD64
74-
id: build
75-
uses: docker/build-push-action@v5
76-
with:
77-
context: .
78-
platforms: linux/amd64
79-
push: true
80-
tags: ${{ steps.meta.outputs.tags }}-amd64
81-
labels: ${{ steps.meta.outputs.labels }}
82-
cache-from: type=gha,scope=openevolve-amd64
83-
cache-to: type=gha,scope=openevolve-amd64,mode=max
84-
provenance: mode=max
85-
sbom: true
86-
87-
# ARM64 Docker build job
88-
docker-build-arm64:
89-
name: Build Docker image (ARM64)
90-
runs-on: ubuntu-latest
91-
needs: pypi-publish
92-
permissions:
93-
contents: read
94-
packages: write
95-
outputs:
96-
digest: ${{ steps.build.outputs.digest }}
97-
metadata: ${{ steps.meta.outputs.json }}
9838
steps:
9939
- name: Checkout
10040
uses: actions/checkout@v4
@@ -129,75 +69,15 @@ jobs:
12969
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme
13070
org.opencontainers.image.licenses=Apache-2.0
13171
132-
- name: Build and push ARM64
133-
id: build
72+
- name: Build and push multi-platform Docker image
13473
uses: docker/build-push-action@v5
13574
with:
13675
context: .
137-
platforms: linux/arm64
76+
platforms: linux/amd64,linux/arm64
13877
push: true
139-
tags: ${{ steps.meta.outputs.tags }}-arm64
78+
tags: ${{ steps.meta.outputs.tags }}
14079
labels: ${{ steps.meta.outputs.labels }}
141-
cache-from: type=gha,scope=openevolve-arm64
142-
cache-to: type=gha,scope=openevolve-arm64,mode=max
80+
cache-from: type=gha,scope=openevolve-multiarch
81+
cache-to: type=gha,scope=openevolve-multiarch,mode=max
14382
provenance: mode=max
144-
sbom: true
145-
146-
# Create multi-platform manifest
147-
docker-manifest:
148-
name: Create multi-platform manifest
149-
runs-on: ubuntu-latest
150-
needs: [docker-build-amd64, docker-build-arm64]
151-
permissions:
152-
contents: read
153-
packages: write
154-
steps:
155-
- name: Log in to GitHub Container Registry
156-
uses: docker/login-action@v3
157-
with:
158-
registry: ghcr.io
159-
username: ${{ github.actor }}
160-
password: ${{ secrets.GITHUB_TOKEN }}
161-
162-
- name: Extract metadata
163-
id: meta
164-
uses: docker/metadata-action@v5
165-
with:
166-
images: ghcr.io/${{ github.repository }}
167-
tags: |
168-
type=semver,pattern={{version}}
169-
type=semver,pattern={{major}}.{{minor}}
170-
type=raw,value=latest
171-
labels: |
172-
org.opencontainers.image.title=OpenEvolve
173-
org.opencontainers.image.description=Open-source evolutionary coding agent
174-
org.opencontainers.image.vendor=OpenEvolve
175-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
176-
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme
177-
org.opencontainers.image.licenses=Apache-2.0
178-
179-
- name: Create and push multi-platform manifests
180-
run: |
181-
# Get the tags from metadata
182-
TAGS="${{ steps.meta.outputs.tags }}"
183-
184-
# Create manifests for each tag
185-
for tag in $TAGS; do
186-
echo "Creating manifest for $tag"
187-
docker manifest create $tag \
188-
${tag}-amd64 \
189-
${tag}-arm64
190-
191-
# Add platform annotations
192-
docker manifest annotate $tag ${tag}-amd64 --os linux --arch amd64
193-
docker manifest annotate $tag ${tag}-arm64 --os linux --arch arm64 --variant v8
194-
195-
# Push the manifest
196-
docker manifest push $tag
197-
done
198-
199-
- name: Clean up platform-specific tags
200-
run: |
201-
# Note: Platform-specific tags are kept for debugging purposes
202-
# They can be manually cleaned up later if needed
203-
echo "Platform-specific tags retained: -amd64, -arm64 suffixes"
83+
sbom: true

openevolve/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version information for openevolve package."""
22

3-
__version__ = "0.2.5"
3+
__version__ = "0.2.6"

0 commit comments

Comments
 (0)