Compare commits
2 Commits
1.0.63
...
feat/custo
Author | SHA1 | Date | |
---|---|---|---|
4bff22d321 | |||
3613596cd7 |
1
.github/workflows/docker-publish.yml
vendored
1
.github/workflows/docker-publish.yml
vendored
@ -34,5 +34,6 @@ jobs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"action": "published",
|
"action": "published",
|
||||||
"release": {
|
"release": {
|
||||||
"tag_name": "v1.0.52"
|
"tag_name": "v1.0.53"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
15
index.ts
15
index.ts
@ -16,6 +16,7 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
// Add type imports for proxy agents
|
// Add type imports for proxy agents
|
||||||
import { Agent } from "http";
|
import { Agent } from "http";
|
||||||
|
import { Agent as HttpsAgent } from 'https';
|
||||||
import { URL } from "url";
|
import { URL } from "url";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -197,6 +198,16 @@ const USE_PIPELINE = process.env.USE_PIPELINE === "true";
|
|||||||
// Add proxy configuration
|
// Add proxy configuration
|
||||||
const HTTP_PROXY = process.env.HTTP_PROXY;
|
const HTTP_PROXY = process.env.HTTP_PROXY;
|
||||||
const HTTPS_PROXY = process.env.HTTPS_PROXY;
|
const HTTPS_PROXY = process.env.HTTPS_PROXY;
|
||||||
|
const NODE_TLS_REJECT_UNAUTHORIZED = process.env.NODE_TLS_REJECT_UNAUTHORIZED;
|
||||||
|
const GITLAB_CA_CERT_PATH = process.env.GITLAB_CA_CERT_PATH;
|
||||||
|
|
||||||
|
let sslOptions= undefined;
|
||||||
|
if (NODE_TLS_REJECT_UNAUTHORIZED === '0') {
|
||||||
|
sslOptions = { rejectUnauthorized: false };
|
||||||
|
} else if (GITLAB_CA_CERT_PATH) {
|
||||||
|
const ca = fs.readFileSync(GITLAB_CA_CERT_PATH);
|
||||||
|
sslOptions = { ca };
|
||||||
|
}
|
||||||
|
|
||||||
// Configure proxy agents if proxies are set
|
// Configure proxy agents if proxies are set
|
||||||
let httpAgent: Agent | undefined = undefined;
|
let httpAgent: Agent | undefined = undefined;
|
||||||
@ -213,9 +224,11 @@ if (HTTPS_PROXY) {
|
|||||||
if (HTTPS_PROXY.startsWith("socks")) {
|
if (HTTPS_PROXY.startsWith("socks")) {
|
||||||
httpsAgent = new SocksProxyAgent(HTTPS_PROXY);
|
httpsAgent = new SocksProxyAgent(HTTPS_PROXY);
|
||||||
} else {
|
} else {
|
||||||
httpsAgent = new HttpsProxyAgent(HTTPS_PROXY);
|
httpsAgent = new HttpsProxyAgent(HTTPS_PROXY, sslOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
httpsAgent = httpsAgent || new HttpsAgent(sslOptions);
|
||||||
|
httpAgent = httpAgent || new Agent();
|
||||||
|
|
||||||
// Modify DEFAULT_HEADERS to include agent configuration
|
// Modify DEFAULT_HEADERS to include agent configuration
|
||||||
const DEFAULT_HEADERS = {
|
const DEFAULT_HEADERS = {
|
||||||
|
@ -10,9 +10,9 @@ IMAGE_NAME=gitlab-mcp
|
|||||||
IMAGE_VERSION=$(jq -r '.version' package.json)
|
IMAGE_VERSION=$(jq -r '.version' package.json)
|
||||||
|
|
||||||
echo "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
echo "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
||||||
docker build --platform=linux/arm64 -t "${DOCKER_USER}/${IMAGE_NAME}:latest" .
|
|
||||||
|
|
||||||
docker tag "${DOCKER_USER}/${IMAGE_NAME}:latest" "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
docker buildx build --platform linux/arm64,linux/amd64 \
|
||||||
|
-t "${DOCKER_USER}/${IMAGE_NAME}:latest" \
|
||||||
docker push "${DOCKER_USER}/${IMAGE_NAME}:latest"
|
-t "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}" \
|
||||||
docker push "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
--push \
|
||||||
|
.
|
||||||
|
Reference in New Issue
Block a user