Skip to content

Commit 4bc0eae

Browse files
committed
Add GitHub community and SEO infrastructure
1 parent 5148e04 commit 4bc0eae

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Docker Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v6
24+
25+
- name: Log in to Container Registry
26+
uses: docker/login-action@v6
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract metadata
33+
id: meta
34+
uses: docker/metadata-action@v6
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
tags: |
38+
type=ref,event=tag
39+
type=semver,pattern={{version}}
40+
type=semver,pattern={{major}}.{{minor}}
41+
type=sha
42+
43+
- name: Build and push Docker image
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
push: true
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
51+
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
52+
53+
publish-release:
54+
name: Publish Docker Image Info to Release
55+
needs: docker
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: write
59+
60+
steps:
61+
- uses: actions/checkout@v6
62+
63+
- name: Update release with Docker info
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
DOCKER_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
67+
TAG: ${{ github.ref_name }}
68+
run: |
69+
cat > /tmp/docker-notes.txt << 'DOCKER_NOTES'
70+
71+
### 🐳 Docker Image Available
72+
73+
Pull the Docker image:
74+
75+
```bash
76+
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
77+
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
78+
```
79+
80+
Run with Docker Compose:
81+
82+
```bash
83+
docker pull ghcr.io/MimoJanra/TestOpsMCP:${{ github.ref_name }}
84+
docker-compose -f docker-compose.yml up -d
85+
```
86+
87+
**Image details:**
88+
- Registry: ghcr.io
89+
- Repository: MimoJanra/TestOpsMCP
90+
- Tags: ${{ github.ref_name }}, latest
91+
- Platforms: linux/amd64, linux/arm64
92+
93+
See [DEPLOYMENT.md](docs/DEPLOYMENT.md) for full Docker setup guide.
94+
DOCKER_NOTES
95+
96+
gh release edit "$TAG" --notes-file /tmp/docker-notes.txt 2>/dev/null || echo "Release notes update skipped"

0 commit comments

Comments
 (0)