-
Notifications
You must be signed in to change notification settings - Fork 11
115 lines (113 loc) · 3.51 KB
/
Copy pathimage.yml
File metadata and controls
115 lines (113 loc) · 3.51 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
name: 'build container images'
on:
pull_request:
push:
branches:
- master
tags:
- '*'
concurrency:
group: ci-image-${{ github.head_ref || github.ref }}-${{ github.repository }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- mcp: duckduckgo
dockerfile: ./Dockerfile
context: ./
- mcp: weather
dockerfile: ./Dockerfile
context: ./
- mcp: wait
dockerfile: ./Dockerfile
context: ./
- mcp: memory
dockerfile: ./Dockerfile
context: ./
- mcp: homeassistant
dockerfile: ./Dockerfile
context: ./
- mcp: scripts
dockerfile: ./Dockerfile
context: ./
- mcp: localrecall
dockerfile: ./Dockerfile
context: ./
- mcp: twitter
dockerfile: ./Dockerfile
context: ./
- mcp: todo
dockerfile: ./Dockerfile
context: ./
- mcp: mailbox
dockerfile: ./Dockerfile
context: ./
- mcp: opencode
dockerfile: ./opencode/Dockerfile
context: ./
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@032a4b3bda1b716928481836ac5bfe36e1feaad6
with:
images: |
ghcr.io/${{ github.repository }}/${{ matrix.mcp }}
tags: |
type=semver,pattern={{raw}}
type=ref,event=branch
flavor: |
latest=auto
prefix=
suffix=
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MCP_SERVER=${{ matrix.mcp }}
cache-from: type=gha,scope=${{ matrix.mcp }}-ci-image-${{ github.ref_name }}
cache-to: type=gha,mode=max,scope=${{ matrix.mcp }}-ci-image-${{ github.ref_name }}
- name: Build PR
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MCP_SERVER=${{ matrix.mcp }}
cache-from: type=gha,scope=${{ matrix.mcp }}-ci-image-main