Skip to content

Commit e07974c

Browse files
authored
Merge pull request #7 from sredevopsorg/upstream
2 parents 2bfc22d + ced92d3 commit e07974c

File tree

24 files changed

+1225
-474
lines changed

24 files changed

+1225
-474
lines changed

.github/renovate.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
// Exclude dependencies in jobs that don't have automated tests
32-
"matchPaths": ["jobs/populate-explore-json/**", "jobs/cleanup-expired-key-value-records/**", "jobs/update-external-accounts/**"],
32+
"matchPaths": ["jobs/populate-explore-json/**"],
3333
"enabled": false
3434
}
3535
]

.github/workflows/build.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -220,53 +220,6 @@ jobs:
220220
path: /tmp/activitypub-migrations-${{ matrix.platform_slug }}.tar
221221
retention-days: 1
222222

223-
build-cleanup-job:
224-
name: Build Cleanup Job Image
225-
runs-on: ubuntu-latest
226-
if: github.ref == 'refs/heads/main'
227-
steps:
228-
- name: Checkout
229-
uses: actions/checkout@v4
230-
231-
- name: Check for changes in cleanup job
232-
id: changes
233-
uses: dorny/paths-filter@v3
234-
with:
235-
filters: |
236-
cleanup:
237-
- 'jobs/cleanup-expired-key-value-records/**'
238-
239-
- name: Set up Docker Buildx
240-
uses: docker/setup-buildx-action@v3
241-
242-
- name: Docker metadata
243-
if: steps.changes.outputs.cleanup == 'true'
244-
id: cleanup-meta
245-
uses: docker/metadata-action@v5
246-
with:
247-
images: europe-docker.pkg.dev/ghost-activitypub/activitypub/cleanup-expired-key-value-records
248-
tags: |
249-
type=sha
250-
type=edge,branch=main
251-
252-
- name: Authenticate with GCP
253-
if: steps.changes.outputs.cleanup == 'true'
254-
uses: google-github-actions/auth@v2
255-
id: gcp-auth
256-
with:
257-
token_format: access_token
258-
workload_identity_provider: projects/687476608778/locations/global/workloadIdentityPools/github-oidc-activitypub/providers/github-provider-activitypub
259-
service_account: cicd-activitypub-terraform@ghost-activitypub.iam.gserviceaccount.com
260-
261-
- name: Build cleanup job image
262-
if: steps.changes.outputs.cleanup == 'true'
263-
uses: docker/build-push-action@v6
264-
with:
265-
context: jobs/cleanup-expired-key-value-records
266-
load: true
267-
tags: ${{ steps.cleanup-meta.outputs.tags }}
268-
push: true
269-
270223
build-populate-explore-json-job:
271224
name: Build Populate Explore JSON Job
272225
runs-on: ubuntu-latest

.github/workflows/cicd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ jobs:
5959
name: Slack Notification on Failure
6060
needs: [build, test, push, deploy]
6161
runs-on: ubuntu-latest
62+
if: always()
6263
steps:
6364
- uses: tryghost/actions/actions/slack-build@main
64-
if: always() && failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
65+
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
6566
with:
6667
status: ${{ job.status }}
6768
env:

dev/scripts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:bookworm@sha256:7dc1e2b39b0147079a16347915e9583cb2f239d4896fe2beac396b979e5c06a9
1+
FROM debian:bookworm@sha256:93492d1405a072c9d3b89110490e330e0b7eb37754cafc9520908b7fe6873f5f
22

33
RUN apt-get update -y
44
RUN apt-get install -y curl openssl jq

docker-compose.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ services:
2828
- GCP_BUCKET_NAME=activitypub
2929
- GCP_STORAGE_EMULATOR_HOST=http://fake-gcs:4443
3030
# - GCS_LOCAL_STORAGE_HOSTING_URL=https://<tailscale-url>/.ghost/activitypub/gcs
31-
- ACTIVITYPUB_COLLECTION_PAGE_SIZE=20
3231
- LOCAL_STORAGE_PATH=/opt/activitypub/content
3332
# - LOCAL_STORAGE_HOSTING_URL=https://<tailscale-url>/.ghost/activitypub/local-storage
3433
# - GHOST_PRO_IP_ADDRESSES=100.83.192.90,192.168.65.1
@@ -64,15 +63,6 @@ services:
6463
mysql:
6564
condition: service_healthy
6665

67-
cleanup-expired-key-value-records:
68-
build: jobs/cleanup-expired-key-value-records
69-
environment:
70-
- MYSQL_USER=ghost
71-
- MYSQL_PASSWORD=password
72-
- MYSQL_HOST=mysql
73-
- MYSQL_PORT=3306
74-
- MYSQL_DATABASE=activitypub
75-
7666
scripts:
7767
build: dev/scripts
7868
depends_on:
@@ -90,7 +80,7 @@ services:
9080
- activitypub
9181

9282
mysql:
93-
image: mysql:8.4.6@sha256:6e60ad6d61d8e7f0a4fd07f6b14109331d66a2f0d089e4b7a1f485d671a29604
83+
image: mysql:8.4.6@sha256:5367102acfefeaa47eb0eb57c8d4f8b96c8c14004859131eac9bbfaa62f81e34
9484
environment:
9585
- MYSQL_ROOT_PASSWORD=root
9686
- MYSQL_USER=ghost
@@ -168,7 +158,6 @@ services:
168158
- GCP_BUCKET_NAME=activitypub
169159
- GCS_LOCAL_STORAGE_HOSTING_URL=http://fake-gcs:4443/.ghost/activitypub/gcs
170160
- GCP_STORAGE_EMULATOR_HOST=http://fake-gcs:4443
171-
- ACTIVITYPUB_COLLECTION_PAGE_SIZE=2
172161
- REDIS_HOST=redis-testing
173162
- REDIS_PORT=6379
174163
- FEDIFY_KV_STORE_TYPE=redis
@@ -202,15 +191,6 @@ services:
202191
mysql-testing:
203192
condition: service_healthy
204193

205-
cleanup-expired-key-value-records-testing:
206-
build: jobs/cleanup-expired-key-value-records
207-
environment:
208-
- MYSQL_USER=ghost
209-
- MYSQL_PASSWORD=password
210-
- MYSQL_HOST=mysql-testing
211-
- MYSQL_PORT=3306
212-
- MYSQL_DATABASE=activitypub
213-
214194
cucumber-tests:
215195
networks:
216196
- test_network
@@ -242,7 +222,7 @@ services:
242222
mysql-testing:
243223
networks:
244224
- test_network
245-
image: mysql:8.4.6@sha256:6e60ad6d61d8e7f0a4fd07f6b14109331d66a2f0d089e4b7a1f485d671a29604
225+
image: mysql:8.4.6@sha256:5367102acfefeaa47eb0eb57c8d4f8b96c8c14004859131eac9bbfaa62f81e34
246226
environment:
247227
- MYSQL_ROOT_PASSWORD=root
248228
- MYSQL_USER=ghost

docs/env-vars.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ This ActivityPub service uses a variety of environment variables to configure it
2020
- `SKIP_SIGNATURE_VERIFICATION` - Set to `true` to skip ActivityPub signature verification
2121
- This is only used in `development` and `testing` environments
2222
- See [https://github.com/fedify-dev/fedify/issues/110](https://github.com/fedify-dev/fedify/issues/110) for more details
23-
- `ACTIVITYPUB_COLLECTION_PAGE_SIZE`* - Set the number of items to return per page for an ActivityPub collection
24-
- This used by the `outbox` and `following` collections
2523
- `FEDIFY_KV_STORE_TYPE` - Set to `redis` to use Redis as the [key-value store for Fedify](https://fedify.dev/manual/kv)
2624
- If not set, MySQL will be used
2725
- `USE_MQ` - Set to `true` to enable message queue usage

docs/one-off-jobs.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Previous examples of this:
66

77
- [PR #407](https://github.com/TryGhost/ActivityPub/pull/407)
88
- [PR #1240](https://github.com/TryGhost/ActivityPub/pull/1240)
9+
- [PR #1295](https://github.com/TryGhost/ActivityPub/pull/1295)
910

10-
One-off jobs are usually added to the repo for a short period, then
11-
removed once confirmed no longer needed.
11+
One-off jobs are usually added to the repo for a short period of time, then
12+
removed once confirmed that they are no longer needed
1213

1314
Even though the job is one-off, it is still important to ensure that the logic
1415
is covered by sufficient tests

jobs/__template__/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:1.2.21-alpine@sha256:02564b43c26a0dc156ff4b70d7ccb68ebae5c486771d699ed1520c42e6ac5cb0
1+
FROM oven/bun:1.2.23-alpine@sha256:0841c588f6304300baf1d395ae339ce09a6e18c4b6a7cdd4fddcbdb87a2f096a
22

33
WORKDIR /opt/job
44

jobs/__template__/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
mysql-test:
3-
image: mysql:8.4.6@sha256:6e60ad6d61d8e7f0a4fd07f6b14109331d66a2f0d089e4b7a1f485d671a29604
3+
image: mysql:8.4.6@sha256:5367102acfefeaa47eb0eb57c8d4f8b96c8c14004859131eac9bbfaa62f81e34
44
environment:
55
MYSQL_ROOT_PASSWORD: root
66
MYSQL_DATABASE: __JOB_NAME__

jobs/cleanup-expired-key-value-records/Dockerfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)