File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Docker image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+
9+ env :
10+ IMAGE_NAME : ghcr.io/${{ github.repository }}/albert-api-mcp-bridge
11+ IMAGE_TAG : ${{ github.sha }}
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+ steps :
20+ - name : Checkout MCP-Bridge repo
21+ uses : actions/checkout@v4
22+ with :
23+ repository : SecretiveShell/MCP-Bridge
24+ fetch-depth : 0
25+ path : mcp-bridge
26+ - name : Get latest tag
27+ id : get_hash
28+ run : |
29+ ls
30+ cd MCP-Bridge
31+ LATEST_SHA=$(git log -1 --format=%H)
32+ echo "tag=$LATEST_SHA" >> $GITHUB_ENV
33+ - name : Log in to GitHub Container Registry
34+ uses : docker/login-action@v3
35+ with :
36+ registry : ghcr.io
37+ username : ${{ github.actor }}
38+ password : ${{ secrets.GITHUB_TOKEN }}
39+
40+ - name : Set up Docker Buildx
41+ uses : docker/setup-buildx-action@v3
42+
43+ - name : Build and push
44+ uses : docker/build-push-action@v6
45+ with :
46+ context : MCP-Bridge
47+ push : true
48+ tags : ${{ env.IMAGE_NAME }}:${{ env.LATEST_SHA }}
49+ cache-from : type=gha
50+ cache-to : type=gha,mode=max
51+ platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments