Repository navigation
99 lines (88 loc) · 3.35 KB
/
Copy pathdocker.yml
File metadata and controls
99 lines (88 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Docker image
# Publishes ghcr.io/openmuseagent/openmuse for linux/amd64 and linux/arm64:
# main -> :edge
# tag vX.Y.Z -> :X.Y.Z, :X.Y, :latest
# Pull requests build the amd64 image without pushing (the CI workflow smoke-tests it).
on:
push:
branches: [main]
tags: ["v*"]
workflow_dispatch:
permissions:
contents: read
packages: write
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Image tags
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/openmuse
# lower-case is required by GHCR; the owner is OpenMuseAgent
flavor: latest=false
tags: |
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
labels: |
org.opencontainers.image.title=OpenMuse
org.opencontainers.image.description=Open-source version of Meta's Muse personal agent: phone app, Sentinel gatekeeper, credential vault, memory and goals. Bring your own model.
org.opencontainers.image.licenses=MIT
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# The same image with Chromium bundled and the browser tool on: :edge-browser,
# :X.Y.Z-browser, :latest-browser. amd64 only: Chromium and its libraries under QEMU
# take far too long to build; on an arm64 box, `docker build --build-arg WITH_BROWSER=1 .`
# does the same natively.
- name: Image tags (browser)
id: meta_browser
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/openmuse
flavor: |
latest=false
suffix=-browser
tags: |
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
labels: |
org.opencontainers.image.title=OpenMuse (with browser)
org.opencontainers.image.description=OpenMuse with Chromium bundled for the browser tool.
org.opencontainers.image.licenses=MIT
- name: Build and push (browser)
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64
build-args: WITH_BROWSER=1
push: true
tags: ${{ steps.meta_browser.outputs.tags }}
labels: ${{ steps.meta_browser.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max