|
9 | 9 | workflow_dispatch: |
10 | 10 |
|
11 | 11 | env: |
12 | | - IMAGE_NAME: secops-mcp-server |
| 12 | + IMAGE_NAME: mcp-server |
13 | 13 | REGISTRY: ghcr.io |
14 | 14 |
|
15 | 15 | jobs: |
16 | | - detect-changes: |
17 | | - runs-on: ubuntu-latest |
18 | | - name: Detect Changes |
19 | | - outputs: |
20 | | - chart-changed: ${{ steps.detect.outputs.chart-changed }} |
21 | | - version-bump: ${{ steps.detect.outputs.version-bump }} |
22 | | - release-type: ${{ steps.detect.outputs.release-type }} |
23 | | - steps: |
24 | | - - name: Checkout repository |
25 | | - uses: actions/checkout@v4 |
26 | | - with: |
27 | | - fetch-depth: 0 |
28 | | - |
29 | | - - name: Detect changes |
30 | | - id: detect |
31 | | - run: | |
32 | | - # Check if chart files have changed |
33 | | - if git diff HEAD~1 HEAD --name-only | grep -q "^helm/"; then |
34 | | - echo "chart-changed=true" >> $GITHUB_OUTPUT |
35 | | - else |
36 | | - echo "chart-changed=false" >> $GITHUB_OUTPUT |
37 | | - fi |
38 | | -
|
39 | | - # Determine release type based on commit message or tag |
40 | | - if [[ "${{ github.ref }}" == refs/tags/* ]]; then |
41 | | - echo "release-type=tag" >> $GITHUB_OUTPUT |
42 | | - TAG="${{ github.ref_name }}" |
43 | | - if [[ $TAG =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then |
44 | | - echo "version-bump=${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" >> $GITHUB_OUTPUT |
45 | | - fi |
46 | | - else |
47 | | - # Check commit message for semver directives |
48 | | - COMMIT_MSG=$(git log -1 --pretty=%B) |
49 | | - if echo "$COMMIT_MSG" | grep -qi "BREAKING\|major"; then |
50 | | - echo "release-type=major" >> $GITHUB_OUTPUT |
51 | | - elif echo "$COMMIT_MSG" | grep -qi "feat\|minor"; then |
52 | | - echo "release-type=minor" >> $GITHUB_OUTPUT |
53 | | - elif echo "$COMMIT_MSG" | grep -qi "fix\|patch"; then |
54 | | - echo "release-type=patch" >> $GITHUB_OUTPUT |
55 | | - else |
56 | | - echo "release-type=patch" >> $GITHUB_OUTPUT |
57 | | - fi |
58 | | - fi |
59 | | -
|
60 | 16 | build-and-push-docker: |
61 | 17 | runs-on: ubuntu-latest |
62 | 18 | name: Build and Push Docker Image |
@@ -108,11 +64,7 @@ jobs: |
108 | 64 | publish-helm-chart: |
109 | 65 | runs-on: ubuntu-latest |
110 | 66 | name: Publish Helm Chart |
111 | | - needs: [detect-changes, build-and-push-docker] |
112 | | - if: | |
113 | | - always() && |
114 | | - (github.event_name == 'push' && (github.ref_type == 'tag' || github.ref == 'refs/heads/main')) && |
115 | | - (needs.detect-changes.outputs.chart-changed == 'true' || github.ref_type == 'tag') |
| 67 | + needs: [ build-and-push-docker ] |
116 | 68 | permissions: |
117 | 69 | contents: read |
118 | 70 | packages: write |
@@ -168,14 +120,14 @@ jobs: |
168 | 120 | CHART_VERSION=$(grep "^version:" ./helm/mcp-server/Chart.yaml | cut -d' ' -f2 | tr -d '"') |
169 | 121 | echo "## ✅ Helm Chart Released" >> $GITHUB_STEP_SUMMARY |
170 | 122 | echo "" >> $GITHUB_STEP_SUMMARY |
171 | | - echo "Chart: gitguardian-secops-mcp-server" >> $GITHUB_STEP_SUMMARY |
| 123 | + echo "Chart: mcp-server" >> $GITHUB_STEP_SUMMARY |
172 | 124 | echo "Version: ${CHART_VERSION}" >> $GITHUB_STEP_SUMMARY |
173 | 125 | echo "" >> $GITHUB_STEP_SUMMARY |
174 | 126 | echo "Published to: \`oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/helm-charts\`" >> $GITHUB_STEP_SUMMARY |
175 | 127 | echo "" >> $GITHUB_STEP_SUMMARY |
176 | 128 | echo "Install with:" >> $GITHUB_STEP_SUMMARY |
177 | 129 | echo '```bash' >> $GITHUB_STEP_SUMMARY |
178 | | - echo "helm pull oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/helm-charts/gitguardian-secops-mcp-server --version ${CHART_VERSION}" >> $GITHUB_STEP_SUMMARY |
| 130 | + echo "helm pull oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/helm-charts/mcp-server --version ${CHART_VERSION}" >> $GITHUB_STEP_SUMMARY |
179 | 131 | echo '```' >> $GITHUB_STEP_SUMMARY |
180 | 132 |
|
181 | 133 | publish-to-pypi: |
@@ -235,7 +187,7 @@ jobs: |
235 | 187 | publish-to-mcp-registry: |
236 | 188 | runs-on: ubuntu-latest |
237 | 189 | name: Publish to MCP Registry |
238 | | - needs: [publish-to-pypi] |
| 190 | + needs: [ publish-to-pypi ] |
239 | 191 | if: | |
240 | 192 | false && |
241 | 193 | always() && |
@@ -302,7 +254,7 @@ jobs: |
302 | 254 | create-github-release: |
303 | 255 | runs-on: ubuntu-latest |
304 | 256 | name: Create GitHub Release |
305 | | - needs: [publish-helm-chart, publish-to-pypi] |
| 257 | + needs: [ publish-helm-chart, publish-to-pypi ] |
306 | 258 | if: | |
307 | 259 | always() && |
308 | 260 | github.event_name == 'push' && |
|
0 commit comments