Skip to content

Commit f8bde55

Browse files
authored
Add docker build and push workflow (#6)
1 parent 093c5e8 commit f8bde55

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Push Multi-arch Docker Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to build and push'
8+
required: true
9+
type: string
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: hasura/mcp-connector
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Login to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Build and push Docker image
37+
env:
38+
VERSION: ${{ inputs.version }}
39+
run: |
40+
docker buildx build \
41+
--platform linux/amd64,linux/arm64 \
42+
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} \
43+
--push .

0 commit comments

Comments
 (0)