|
90 | 90 | json.dump(data, f, indent=2) |
91 | 91 | " |
92 | 92 |
|
93 | | - - name: Set up Docker Buildx |
94 | | - uses: docker/setup-buildx-action@v3 |
95 | | - |
96 | | - - name: Docker meta |
97 | | - id: meta |
98 | | - uses: docker/metadata-action@v5 |
99 | | - with: |
100 | | - images: ${{ env.IMAGE_NAME }} |
101 | | - tags: | |
102 | | - type=ref,event=branch |
103 | | - type=ref,event=pr |
104 | | - type=semver,pattern={{version}},value=${{ steps.version-check.outputs.current_version }},enable=${{ github.ref == 'refs/heads/main' && steps.version-check.outputs.version_changed == 'true' }} |
105 | | - type=semver,pattern=v{{version}},value=${{ steps.version-check.outputs.current_version }},enable=${{ github.ref == 'refs/heads/main' && steps.version-check.outputs.version_changed == 'true' }} |
106 | | - type=raw,value=latest,enable={{is_default_branch}} |
107 | | -
|
108 | | - - name: Login to GitHub Container Registry |
109 | | - uses: docker/login-action@v3 |
110 | | - with: |
111 | | - registry: ${{ env.DOCKER_REGISTRY }} |
112 | | - username: ${{ env.DOCKER_USERNAME }} |
113 | | - password: ${{ env.DOCKER_PASSWORD }} |
114 | | - |
115 | | - - name: Build and push Docker image |
116 | | - uses: docker/build-push-action@v5 |
117 | | - with: |
118 | | - push: true |
119 | | - platforms: linux/amd64,linux/arm64 |
120 | | - file: ./Dockerfile |
121 | | - tags: ${{ steps.meta.outputs.tags }} |
122 | | - labels: | |
123 | | - ${{ steps.meta.outputs.labels }} |
124 | | - io.modelcontextprotocol.server.name=io.github.codealive-ai/codealive-mcp |
125 | | - cache-from: type=gha |
126 | | - cache-to: type=gha |
127 | | - |
128 | | - - name: Create git tag |
129 | | - if: steps.version-check.outputs.version_changed == 'true' && github.ref == 'refs/heads/main' |
130 | | - run: | |
131 | | - git config user.name "github-actions[bot]" |
132 | | - git config user.email "github-actions[bot]@users.noreply.github.com" |
133 | | - git tag "v${{ steps.version-check.outputs.current_version }}" |
134 | | - git push origin "v${{ steps.version-check.outputs.current_version }}" |
135 | | -
|
136 | 93 | - name: Validate server.json |
137 | 94 | if: steps.version-check.outputs.version_changed == 'true' && github.ref == 'refs/heads/main' |
138 | 95 | run: | |
@@ -201,6 +158,49 @@ jobs: |
201 | 158 | ) |
202 | 159 | PY |
203 | 160 |
|
| 161 | + - name: Set up Docker Buildx |
| 162 | + uses: docker/setup-buildx-action@v3 |
| 163 | + |
| 164 | + - name: Docker meta |
| 165 | + id: meta |
| 166 | + uses: docker/metadata-action@v5 |
| 167 | + with: |
| 168 | + images: ${{ env.IMAGE_NAME }} |
| 169 | + tags: | |
| 170 | + type=ref,event=branch |
| 171 | + type=ref,event=pr |
| 172 | + type=semver,pattern={{version}},value=${{ steps.version-check.outputs.current_version }},enable=${{ github.ref == 'refs/heads/main' && steps.version-check.outputs.version_changed == 'true' }} |
| 173 | + type=semver,pattern=v{{version}},value=${{ steps.version-check.outputs.current_version }},enable=${{ github.ref == 'refs/heads/main' && steps.version-check.outputs.version_changed == 'true' }} |
| 174 | + type=raw,value=latest,enable={{is_default_branch}} |
| 175 | +
|
| 176 | + - name: Login to GitHub Container Registry |
| 177 | + uses: docker/login-action@v3 |
| 178 | + with: |
| 179 | + registry: ${{ env.DOCKER_REGISTRY }} |
| 180 | + username: ${{ env.DOCKER_USERNAME }} |
| 181 | + password: ${{ env.DOCKER_PASSWORD }} |
| 182 | + |
| 183 | + - name: Build and push Docker image |
| 184 | + uses: docker/build-push-action@v5 |
| 185 | + with: |
| 186 | + push: true |
| 187 | + platforms: linux/amd64,linux/arm64 |
| 188 | + file: ./Dockerfile |
| 189 | + tags: ${{ steps.meta.outputs.tags }} |
| 190 | + labels: | |
| 191 | + ${{ steps.meta.outputs.labels }} |
| 192 | + io.modelcontextprotocol.server.name=io.github.codealive-ai/codealive-mcp |
| 193 | + cache-from: type=gha |
| 194 | + cache-to: type=gha |
| 195 | + |
| 196 | + - name: Create git tag |
| 197 | + if: steps.version-check.outputs.version_changed == 'true' && github.ref == 'refs/heads/main' |
| 198 | + run: | |
| 199 | + git config user.name "github-actions[bot]" |
| 200 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 201 | + git tag "v${{ steps.version-check.outputs.current_version }}" |
| 202 | + git push origin "v${{ steps.version-check.outputs.current_version }}" |
| 203 | +
|
204 | 204 | - name: Install MCP Publisher CLI |
205 | 205 | if: steps.version-check.outputs.version_changed == 'true' && github.ref == 'refs/heads/main' |
206 | 206 | run: | |
|
0 commit comments