forked from PaulFidika/gmail-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (72 loc) · 2.19 KB
/
container.yaml
File metadata and controls
82 lines (72 loc) · 2.19 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
name: container
on:
push:
branches: [master]
tags:
- 'v*'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Build image
id: build
uses: redhat-actions/buildah-build@v2.13
with:
image: gmail-mcp-server
tags: ${{ github.sha }}-${{ matrix.arch }}
containerfiles: ./Containerfile
platforms: linux/${{ matrix.arch }}
- name: Push per-arch image
if: github.event_name != 'pull_request'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
manifest:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/gmail-mcp-server
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Create and push multi-arch manifest
run: |
IMAGE="ghcr.io/${{ github.repository_owner }}/gmail-mcp-server"
while IFS= read -r tag; do
docker buildx imagetools create \
-t "$tag" \
"${IMAGE}:${{ github.sha }}-amd64" \
"${IMAGE}:${{ github.sha }}-arm64"
done <<< "${{ steps.meta.outputs.tags }}"