Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/load-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:

- name: Log in to GitHub Container Registry
if: inputs.use-artifact == 'false'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ jobs:
working-directory: ghost/core/core/server/data/tinybird
services:
tinybird:
image: tinybirdco/tinybird-local:latest@sha256:d7b1583e02f6c35c5b5b145f9a375817c093da137a04436e8e2a498418c8054b
image: tinybirdco/tinybird-local:latest@sha256:2f8317aceba18ce20dc4105b0b712b2701bb477a4d9a25477e2aa72bdf9d1423
ports:
- 7181:7181
steps:
Expand Down Expand Up @@ -903,11 +903,11 @@ jobs:
uses: ./.github/actions/setup-docker-registry-mirrors

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4

- name: Log in to GitHub Container Registry
if: steps.strategy.outputs.should-push == 'true'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -951,6 +951,8 @@ jobs:

- name: Build & push core image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
env:
BUILDKIT_PROGRESS: plain
with:
context: /tmp/ghost-production
file: Dockerfile.production
Expand All @@ -967,6 +969,8 @@ jobs:

- name: Build & push full image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
env:
BUILDKIT_PROGRESS: plain
with:
context: /tmp/ghost-production
file: Dockerfile.production
Expand Down Expand Up @@ -1120,7 +1124,7 @@ jobs:
uses: ./.github/actions/setup-docker-registry-mirrors

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
with:
# Fork/cross-repo PRs use artifact transfer (no GHCR push). The default
# docker-container driver runs in an isolated BuildKit container that
Expand Down Expand Up @@ -1150,7 +1154,7 @@ jobs:

- name: Log in to GitHub Container Registry
if: steps.strategy.outputs.should-push == 'true'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -1284,7 +1288,7 @@ jobs:
uses: ./.github/actions/setup-docker-registry-mirrors

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4

- name: Pull or build Tinybird CLI Image
if: matrix.analytics == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/devcontainer-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4

- name: Login to GHCR
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-tb-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4

- name: Login to GHCR
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
17 changes: 11 additions & 6 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ ARG NODE_VERSION=22.18.0
# ---- Core: server + production deps ----
FROM node:$NODE_VERSION-bookworm-slim AS core

ARG GHOST_BUILD_VERSION=""
ENV NODE_ENV=production
ENV GHOST_BUILD_VERSION=${GHOST_BUILD_VERSION}

RUN apt-get update && \
apt-get install -y --no-install-recommends libjemalloc2 fontconfig && \
Expand All @@ -25,26 +23,33 @@ RUN apt-get update && \

WORKDIR /home/ghost

COPY --exclude=core/built/admin . .

RUN corepack enable

COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY components ./components

RUN --mount=type=cache,target=/root/.local/share/pnpm/store,id=pnpm-store \
apt-get update && \
apt-get install -y --no-install-recommends build-essential python3 && \
pnpm install --ignore-scripts --prod --prefer-offline && \
(cd node_modules/sqlite3 && npm run install) && \
apt-get purge -y build-essential python3 && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p default log && \
rm -rf /var/lib/apt/lists/*

COPY --exclude=core/built/admin . .

RUN mkdir -p default log && \
cp -R content base_content && \
cp -R content/themes/casper default/casper && \
([ -d content/themes/source ] && cp -R content/themes/source default/source || true) && \
chown ghost:ghost /home/ghost && \
chown -R nobody:nogroup /home/ghost/* && \
chown -R ghost:ghost /home/ghost/content /home/ghost/log

ARG GHOST_BUILD_VERSION=""
ENV GHOST_BUILD_VERSION=${GHOST_BUILD_VERSION}

USER ghost
ENV LD_PRELOAD=libjemalloc.so.2

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '@tryghost/admin-x-framework/test/acceptance';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse, waitForApiRequest} from '@tryghost/admin-x-framework/test/acceptance';

test.describe('Slack integration', async () => {
test('Supports updating Slack settings', async ({page}) => {
Expand Down Expand Up @@ -76,7 +76,7 @@ test.describe('Slack integration', async () => {
{key: 'slack_url', value: 'https://hooks.slack.com/services/123456789/123456789/123456789'},
{key: 'slack_username', value: 'My site'}
])},
testSlack: {method: 'POST', path: '/slack/test/', responseStatus: 204, response: ''}
testSlack: {method: 'POST', path: '/slack/test/', response: {}}
}});

await page.goto('/');
Expand All @@ -100,6 +100,7 @@ test.describe('Slack integration', async () => {
await slackModal.getByLabel('Username').fill('My site');
await slackModal.getByRole('button', {name: 'Send test notification'}).click();

await waitForApiRequest(lastApiRequests, 'testSlack');
await expect(page.getByTestId('toast-info')).toHaveText(/Check your Slack channel for the test message/);

expect(lastApiRequests.editSettings?.body).toEqual({
Expand All @@ -108,6 +109,5 @@ test.describe('Slack integration', async () => {
{key: 'slack_username', value: 'My site'}
]
});
expect(lastApiRequests.testSlack).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ test.describe('Member emails settings', async () => {
const previewSubject = modal.getByTestId('welcome-email-preview-subject');
await expect(previewSubject).toHaveValue('Welcome {first_name}');

await previewSubject.press('End');
await previewSubject.type('!');
await previewSubject.fill('Welcome {first_name}!');
await expect(previewSubject).toHaveValue('Welcome {first_name}!');
await modal.getByRole('button', {name: 'Save'}).click();

await expect.poll(() => lastApiRequests.editAutomatedEmail?.body).toMatchObject({
Expand Down Expand Up @@ -736,18 +736,19 @@ test.describe('Member emails settings', async () => {

const editor = modal.locator('[data-kg="editor"] div[contenteditable="true"]').first();
await editor.click({timeout: 5000});
await page.keyboard.press('ControlOrMeta+a');
await page.keyboard.press('Backspace');
await editor.fill('');
await expect(editor).toBeEmpty();
await openSlashMenu(page, 'bookmark');
await page.keyboard.press('Enter');

const bookmarkUrlInput = modal.getByTestId('bookmark-url');
await expect(bookmarkUrlInput).toBeVisible({timeout: 10000});
await bookmarkUrlInput.fill('https://ghost.org/');
await expect(bookmarkUrlInput).toHaveValue('https://ghost.org/');
await bookmarkUrlInput.press('Enter');

await expect(modal.getByTestId('bookmark-title')).toContainText('Ghost: The Creator Economy Platform');
await expect.poll(() => lastApiRequests.fetchOembed?.url || '').toContain('type=bookmark');
await expect(modal.getByTestId('bookmark-title')).toContainText('Ghost: The Creator Economy Platform');
});

test('welcome email editor inserts call to action card via slash menu', async ({page}) => {
Expand Down
2 changes: 1 addition & 1 deletion compose.dev.analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
condition: service_completed_successfully

tinybird-local:
image: tinybirdco/tinybird-local:latest@sha256:d7b1583e02f6c35c5b5b145f9a375817c093da137a04436e8e2a498418c8054b
image: tinybirdco/tinybird-local:latest@sha256:2f8317aceba18ce20dc4105b0b712b2701bb477a4d9a25477e2aa72bdf9d1423
container_name: ghost-dev-tinybird
platform: linux/amd64
stop_grace_period: 2s
Expand Down
Loading
Loading