Merge branch 'main' into add-authentik-sso

This commit is contained in:
egelhaus 2025-04-14 19:27:41 +02:00 committed by GitHub
commit b111dd0af2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 51 additions and 16 deletions

34
Jenkinsfile vendored
View File

@ -3,6 +3,7 @@ pipeline {
environment {
NODE_VERSION = '20.17.0'
PR_NUMBER = "${env.CHANGE_ID}" // PR number comes from webhook payload
}
stages {
@ -32,6 +33,39 @@ pipeline {
sh 'npm run build'
}
}
stage('Build and Push Docker Image') {
when {
expression { return env.CHANGE_ID != null } // Only run if it's a PR
}
steps {
withCredentials([string(credentialsId: 'gh-pat', variable: 'GITHUB_PASS')]) {
// Docker login step
sh '''
echo "$GITHUB_PASS" | docker login ghcr.io -u "egelhaus" --password-stdin
'''
// Set image tag dynamically based on the PR number
sh '''
IMAGE_TAG="ghcr.io/gitroomhq/postiz-app-pr:$PR_NUMBER"
echo "IMAGE_TAG=$IMAGE_TAG" >> image.env
'''
// Build Docker image
sh '''
source image.env
docker build -f Dockerfile.dev -t $IMAGE_TAG .
'''
// Push Docker image to GitHub Container Registry
sh '''
source image.env
docker push $IMAGE_TAG
'''
}
}
}
}
post {
success {

View File

@ -506,7 +506,7 @@ export const MainBillingComponent: FC<{
<PurchaseCrypto />
{!!subscription?.id && (
<div className="flex justify-center mt-[20px] gap-[10px]">
<Button onClick={updatePayment}>Update Payment Method</Button>
<Button onClick={updatePayment}>Update Payment Method / Invoices History</Button>
{isGeneral && !subscription?.cancelAt && (
<Button
className="bg-red-500"

View File

@ -9,7 +9,7 @@ import { useVariables } from '@gitroom/react/helpers/variable.context';
export const PublicComponent = () => {
const user = useUser();
const {frontEndUrl} = useVariables();
const { backendUrl } = useVariables();
const toaster = useToaster();
const [reveal, setReveal] = useState(false);
const [reveal2, setReveal2] = useState(false);
@ -19,6 +19,11 @@ export const PublicComponent = () => {
copy(user?.publicApi!);
}, [user]);
const copyToClipboard2 = useCallback(() => {
toaster.show('MCP copied to clipboard', 'success');
copy(`${backendUrl}/mcp/` + user?.publicApi + '/sse');
}, [user]);
if (!user || !user.publicApi) {
return null;
}
@ -64,11 +69,15 @@ export const PublicComponent = () => {
<div className="my-[16px] mt-[16px] bg-sixth border-fifth items-center border rounded-[4px] p-[24px] flex gap-[24px]">
<div className="flex items-center">
{reveal2 ? (
`${frontEndUrl}/mcp/` + user.publicApi + '/sse'
`${backendUrl}/mcp/` + user.publicApi + '/sse'
) : (
<>
<div className="blur-sm">{(`${frontEndUrl}/mcp/` + user.publicApi + '/sse').slice(0, -5)}</div>
<div>{(`${frontEndUrl}/mcp/` + user.publicApi + '/sse').slice(-5)}</div>
<div className="blur-sm">
{(`${backendUrl}/mcp/` + user.publicApi + '/sse').slice(0, -5)}
</div>
<div>
{(`${backendUrl}/mcp/` + user.publicApi + '/sse').slice(-5)}
</div>
</>
)}
</div>
@ -76,7 +85,7 @@ export const PublicComponent = () => {
{!reveal2 ? (
<Button onClick={() => setReveal2(true)}>Reveal</Button>
) : (
<Button onClick={copyToClipboard}>Copy Key</Button>
<Button onClick={copyToClipboard2}>Copy Key</Button>
)}
</div>
</div>

View File

@ -348,15 +348,7 @@ export class StripeService {
async createBillingPortalLink(customer: string) {
return stripe.billingPortal.sessions.create({
customer,
flow_data: {
after_completion: {
type: 'redirect',
redirect: {
return_url: process.env['FRONTEND_URL'] + '/billing',
},
},
type: 'payment_method_update',
},
return_url: process.env['FRONTEND_URL'] + '/billing',
});
}

View File

@ -1 +1 @@
v1.38.1
v1.39.1