Skip to content

Commit da2f77c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into schema-discriminated-type
# Conflicts: # docs/reference/server-json/server.schema.json
2 parents d56d3c5 + f870a4c commit da2f77c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2619
-869
lines changed

.github/workflows/cancel-pulumi-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373
run: |
7474
echo "$PULUMI_PROD_PASSPHRASE" > passphrase.prod.txt
7575
pulumi login gs://mcp-registry-prod-pulumi-state
76-
PULUMI_CONFIG_PASSPHRASE_FILE=passphrase.prod.txt pulumi cancel --stack gcpProd --yes
76+
PULUMI_CONFIG_PASSPHRASE_FILE=passphrase.prod.txt pulumi cancel --stack gcpProd --yes

.github/workflows/ci.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,12 @@ jobs:
2222
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
2323
with:
2424
go-version-file: 'go.mod'
25-
26-
- name: Cache Go modules
27-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
28-
with:
29-
path: |
30-
~/.cache/go-build
31-
~/go/pkg/mod
32-
key: ${{ runner.os }}-go-${{ github.sha }}-${{ hashFiles('**/go.sum', '.golangci.yml') }}
33-
restore-keys: |
34-
${{ runner.os }}-go-
35-
36-
- name: Download dependencies
37-
run: go mod download
38-
39-
- name: Install golangci-lint
40-
run: |
41-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0
25+
cache: true
4226

4327
- name: Run lint
44-
run: make lint
28+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
29+
with:
30+
version: v2.4.0
4531

4632
- name: Validate schemas and examples
4733
run: make validate
@@ -66,19 +52,7 @@ jobs:
6652
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
6753
with:
6854
go-version-file: 'go.mod'
69-
70-
- name: Cache Go modules
71-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
72-
with:
73-
path: |
74-
~/.cache/go-build
75-
~/go/pkg/mod
76-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
77-
restore-keys: |
78-
${{ runner.os }}-go-
79-
80-
- name: Download dependencies
81-
run: go mod download
55+
cache: true
8256

8357
- name: Run all tests
8458
run: make test-all
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy to Production
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'deploy/Pulumi.gcpProd.yaml'
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
PULUMI_VERSION: "3.188.0"
15+
16+
jobs:
17+
deploy-production:
18+
name: Deploy to Production
19+
runs-on: ubuntu-latest
20+
environment: production
21+
concurrency:
22+
group: deploy-production
23+
cancel-in-progress: false
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
27+
28+
- name: Setup Go
29+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
30+
with:
31+
go-version-file: 'go.mod'
32+
cache: true
33+
34+
- name: Setup Pulumi
35+
uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8
36+
with:
37+
pulumi-version: ${{ env.PULUMI_VERSION }}
38+
39+
- name: Authenticate to Google Cloud
40+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093
41+
with:
42+
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
43+
44+
- name: Setup Google Cloud SDK
45+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db
46+
with:
47+
project_id: mcp-registry-prod
48+
install_components: gke-gcloud-auth-plugin
49+
50+
- name: Deploy to Production
51+
working-directory: ./deploy
52+
env:
53+
PULUMI_PROD_PASSPHRASE: ${{ secrets.PULUMI_PROD_PASSPHRASE }}
54+
run: |
55+
echo "$PULUMI_PROD_PASSPHRASE" > passphrase.prod.txt
56+
make prod-up

.github/workflows/deploy.yml renamed to .github/workflows/deploy-staging.yml

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Deploy
1+
name: Deploy to Staging
22

33
on:
44
push:
55
branches:
66
- main
7+
paths-ignore:
8+
- 'deploy/Pulumi.gcpProd.yaml'
79

810
permissions:
911
contents: read
@@ -32,6 +34,10 @@ jobs:
3234
username: ${{ github.actor }}
3335
password: ${{ secrets.GITHUB_TOKEN }}
3436

37+
- name: Get build timestamp
38+
id: build-time
39+
run: echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT
40+
3541
- name: Extract metadata
3642
id: meta
3743
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
@@ -52,6 +58,10 @@ jobs:
5258
labels: ${{ steps.meta.outputs.labels }}
5359
cache-from: type=gha
5460
cache-to: type=gha,mode=max
61+
build-args: |
62+
VERSION=${{ steps.meta.outputs.version }}
63+
GIT_COMMIT=${{ github.sha }}
64+
BUILD_TIME=${{ steps.build-time.outputs.timestamp }}
5565
5666
deploy-staging:
5767
name: Deploy to Staging
@@ -69,6 +79,7 @@ jobs:
6979
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
7080
with:
7181
go-version-file: 'go.mod'
82+
cache: true
7283

7384
- name: Setup Pulumi
7485
uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8
@@ -93,44 +104,3 @@ jobs:
93104
run: |
94105
echo "$PULUMI_STAGING_PASSPHRASE" > passphrase.staging.txt
95106
make staging-up
96-
97-
deploy-production:
98-
name: Deploy to Production
99-
runs-on: ubuntu-latest
100-
environment: production
101-
needs: deploy-staging
102-
concurrency:
103-
group: deploy-production
104-
cancel-in-progress: false
105-
steps:
106-
- name: Checkout code
107-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
108-
109-
- name: Setup Go
110-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
111-
with:
112-
go-version-file: 'go.mod'
113-
114-
- name: Setup Pulumi
115-
uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8
116-
with:
117-
pulumi-version: ${{ env.PULUMI_VERSION }}
118-
119-
- name: Authenticate to Google Cloud
120-
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093
121-
with:
122-
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
123-
124-
- name: Setup Google Cloud SDK
125-
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db
126-
with:
127-
project_id: mcp-registry-prod
128-
install_components: gke-gcloud-auth-plugin
129-
130-
- name: Deploy to Production
131-
working-directory: ./deploy
132-
env:
133-
PULUMI_PROD_PASSPHRASE: ${{ secrets.PULUMI_PROD_PASSPHRASE }}
134-
run: |
135-
echo "$PULUMI_PROD_PASSPHRASE" > passphrase.prod.txt
136-
make prod-up

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
2323
with:
2424
go-version-file: 'go.mod'
25+
cache: true
2526

2627
- name: Install cosign
2728
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62
2829

2930
- name: Install Syft
30-
uses: anchore/sbom-action/[email protected].6
31+
uses: anchore/sbom-action/[email protected].7
3132

3233
- name: Run GoReleaser
3334
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a
@@ -55,6 +56,10 @@ jobs:
5556
username: ${{ github.actor }}
5657
password: ${{ secrets.GITHUB_TOKEN }}
5758

59+
- name: Get build timestamp
60+
id: build-time
61+
run: echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT
62+
5863
- name: Extract metadata
5964
id: meta
6065
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
@@ -74,4 +79,8 @@ jobs:
7479
tags: ${{ steps.meta.outputs.tags }}
7580
labels: ${{ steps.meta.outputs.labels }}
7681
cache-from: type=gha
77-
cache-to: type=gha,mode=max
82+
cache-to: type=gha,mode=max
83+
build-args: |
84+
VERSION=${{ steps.meta.outputs.version }}
85+
GIT_COMMIT=${{ github.sha }}
86+
BUILD_TIME=${{ steps.build-time.outputs.timestamp }}

0 commit comments

Comments
 (0)