Skip to content

Commit a357aca

Browse files
committed
Merge branch 'eurosky-main' into merge-2026-05-26
2 parents 622d365 + 6e7acf8 commit a357aca

11 files changed

Lines changed: 426 additions & 50 deletions

File tree

Lines changed: 123 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,162 @@
11
name: build-and-push-bsky-ghcr
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
6-
- msi/pds-lexification
7+
- flashes-appview
78

89
env:
910
REGISTRY: ghcr.io
1011
USERNAME: ${{ github.actor }}
1112
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
12-
13-
# github.repository as <account>/<repo>
1413
IMAGE_NAME: ${{ github.repository }}
1514

1615
jobs:
17-
bsky-container-ghcr:
18-
if: github.repository == 'bluesky-social/atproto'
19-
runs-on: ubuntu-22.04
16+
build-platforms:
17+
runs-on: ${{ matrix.runner }}
18+
timeout-minutes: 60
2019
permissions:
2120
contents: read
2221
packages: write
22+
attestations: write
2323
id-token: write
24-
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- platform: linux/amd64
29+
runner: ubuntu-latest
30+
- platform: linux/arm64
31+
runner: ubuntu-24.04-arm
2532
steps:
2633
- name: Checkout repository
27-
uses: actions/checkout@v3
34+
uses: actions/checkout@v5
2835

2936
- name: Setup Docker buildx
30-
uses: docker/setup-buildx-action@v2
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Sanitize platform name
40+
id: platform
41+
run: |
42+
platform=${{ matrix.platform }}
43+
echo "safe=${platform//\//-}" >> $GITHUB_OUTPUT
3144
3245
- name: Log into registry ${{ env.REGISTRY }}
33-
uses: docker/login-action@v2
46+
uses: docker/login-action@v3
3447
with:
3548
registry: ${{ env.REGISTRY }}
3649
username: ${{ env.USERNAME }}
3750
password: ${{ env.PASSWORD }}
3851

3952
- name: Extract Docker metadata
4053
id: meta
41-
uses: docker/metadata-action@v4
54+
uses: docker/metadata-action@v5
4255
with:
4356
images: |
4457
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4558
tags: |
46-
type=sha,enable=true,priority=100,prefix=bsky:,suffix=,format=long
59+
type=sha,enable=true,priority=100,prefix=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
60+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
61+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
4762
48-
- name: Build and push Docker image
49-
id: build-and-push
50-
uses: docker/build-push-action@v4
63+
- name: Build and push by digest
64+
id: build
65+
uses: docker/build-push-action@v6
5166
with:
5267
context: .
53-
push: ${{ github.event_name != 'pull_request' }}
68+
platforms: ${{ matrix.platform }}
5469
file: ./services/bsky/Dockerfile
55-
tags: ${{ steps.meta.outputs.tags }}
5670
labels: ${{ steps.meta.outputs.labels }}
57-
cache-from: type=gha
58-
cache-to: type=gha,mode=max
71+
cache-from: type=gha,scope=bsky-${{ steps.platform.outputs.safe }}
72+
cache-to: type=gha,mode=max,scope=bsky-${{ steps.platform.outputs.safe }}
73+
build-args: |
74+
BUILDKIT_INLINE_CACHE=1
75+
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
76+
77+
- name: Export digest
78+
run: |
79+
mkdir -p /tmp/digests
80+
digest="${{ steps.build.outputs.digest }}"
81+
touch "/tmp/digests/${digest#sha256:}"
82+
83+
- name: Upload digest
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: digests-${{ steps.platform.outputs.safe }}
87+
path: /tmp/digests/*
88+
if-no-files-found: error
89+
retention-days: 1
90+
91+
merge-manifests:
92+
runs-on: ubuntu-latest
93+
needs: build-platforms
94+
permissions:
95+
contents: write
96+
packages: write
97+
attestations: write
98+
id-token: write
99+
steps:
100+
- name: Download digests
101+
uses: actions/download-artifact@v4
102+
with:
103+
pattern: digests-*
104+
merge-multiple: true
105+
path: /tmp/digests
106+
107+
- name: Setup Docker buildx
108+
uses: docker/setup-buildx-action@v3
109+
with:
110+
driver-opts: |
111+
network=host
112+
113+
- name: Log into registry ${{ env.REGISTRY }}
114+
uses: docker/login-action@v3
115+
with:
116+
registry: ${{ env.REGISTRY }}
117+
username: ${{ env.USERNAME }}
118+
password: ${{ env.PASSWORD }}
119+
120+
- name: Extract Docker metadata
121+
id: meta
122+
uses: docker/metadata-action@v5
123+
with:
124+
images: |
125+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
126+
tags: |
127+
type=sha,enable=true,priority=100,prefix=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
128+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
129+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
130+
131+
- name: Create manifest list and push
132+
id: merge
133+
working-directory: /tmp/digests
134+
run: |
135+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
136+
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
137+
138+
- name: Inspect image and get digest
139+
id: inspect
140+
run: |
141+
digest=$(docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$(echo '${{ steps.meta.outputs.tags }}' | head -1 | cut -d':' -f2) | grep "^Digest:" | awk '{print $2}')
142+
echo "digest=$digest" >> $GITHUB_OUTPUT
143+
144+
- name: Generate artifact attestation
145+
uses: actions/attest-build-provenance@v1
146+
with:
147+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
148+
subject-digest: ${{ steps.inspect.outputs.digest }}
149+
push-to-registry: true
150+
151+
- name: Checkout repository for tagging
152+
uses: actions/checkout@v5
153+
with:
154+
token: ${{ secrets.GITHUB_TOKEN }}
155+
156+
- name: Tag repository with datetime
157+
run: |
158+
DATETIME_TAG=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
159+
git config user.name "github-actions[bot]"
160+
git config user.email "github-actions[bot]@users.noreply.github.com"
161+
git tag -a "bsky-$DATETIME_TAG" -m "Release bsky-$DATETIME_TAG"
162+
git push origin "bsky-$DATETIME_TAG"

.github/workflows/build-and-push-ozone-ghcr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414

1515
jobs:
1616
ozone-container-ghcr:
17-
if: github.repository == 'bluesky-social/atproto'
17+
# if: github.repository == 'bluesky-social/atproto'
1818
runs-on: ubuntu-22.04
1919
permissions:
2020
contents: read
Lines changed: 122 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,161 @@
11
name: build-and-push-pds-ghcr
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
6-
- divy/esm-datadog
77

88
env:
99
REGISTRY: ghcr.io
1010
USERNAME: ${{ github.actor }}
1111
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
12-
13-
# github.repository as <account>/<repo>
1412
IMAGE_NAME: ${{ github.repository }}
1513

1614
jobs:
17-
pds-container-ghcr:
18-
if: github.repository == 'bluesky-social/atproto'
19-
runs-on: ubuntu-22.04
15+
build-platforms:
16+
runs-on: ${{ matrix.runner }}
17+
timeout-minutes: 60
2018
permissions:
2119
contents: read
2220
packages: write
21+
attestations: write
2322
id-token: write
24-
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- platform: linux/amd64
28+
runner: ubuntu-latest
29+
- platform: linux/arm64
30+
runner: ubuntu-24.04-arm
2531
steps:
2632
- name: Checkout repository
27-
uses: actions/checkout@v3
33+
uses: actions/checkout@v5
2834

2935
- name: Setup Docker buildx
30-
uses: docker/setup-buildx-action@v2
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Sanitize platform name
39+
id: platform
40+
run: |
41+
platform=${{ matrix.platform }}
42+
echo "safe=${platform//\//-}" >> $GITHUB_OUTPUT
3143
3244
- name: Log into registry ${{ env.REGISTRY }}
33-
uses: docker/login-action@v2
45+
uses: docker/login-action@v3
3446
with:
3547
registry: ${{ env.REGISTRY }}
3648
username: ${{ env.USERNAME }}
3749
password: ${{ env.PASSWORD }}
3850

3951
- name: Extract Docker metadata
4052
id: meta
41-
uses: docker/metadata-action@v4
53+
uses: docker/metadata-action@v5
4254
with:
4355
images: |
4456
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4557
tags: |
46-
type=sha,enable=true,priority=100,prefix=pds:,suffix=,format=long
58+
type=sha,enable=true,priority=100,prefix=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
59+
type=raw,value=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
60+
type=raw,value=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
4761
48-
- name: Build and push Docker image
49-
id: build-and-push
50-
uses: docker/build-push-action@v4
62+
- name: Build and push by digest
63+
id: build
64+
uses: docker/build-push-action@v6
5165
with:
5266
context: .
53-
push: ${{ github.event_name != 'pull_request' }}
67+
platforms: ${{ matrix.platform }}
5468
file: ./services/pds/Dockerfile
55-
tags: ${{ steps.meta.outputs.tags }}
5669
labels: ${{ steps.meta.outputs.labels }}
57-
cache-from: type=gha
58-
cache-to: type=gha,mode=max
70+
cache-from: type=gha,scope=pds-${{ steps.platform.outputs.safe }}
71+
cache-to: type=gha,mode=max,scope=pds-${{ steps.platform.outputs.safe }}
72+
build-args: |
73+
BUILDKIT_INLINE_CACHE=1
74+
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
75+
76+
- name: Export digest
77+
run: |
78+
mkdir -p /tmp/digests
79+
digest="${{ steps.build.outputs.digest }}"
80+
touch "/tmp/digests/${digest#sha256:}"
81+
82+
- name: Upload digest
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: digests-${{ steps.platform.outputs.safe }}
86+
path: /tmp/digests/*
87+
if-no-files-found: error
88+
retention-days: 1
89+
90+
merge-manifests:
91+
runs-on: ubuntu-latest
92+
needs: build-platforms
93+
permissions:
94+
contents: write
95+
packages: write
96+
attestations: write
97+
id-token: write
98+
steps:
99+
- name: Download digests
100+
uses: actions/download-artifact@v4
101+
with:
102+
pattern: digests-*
103+
merge-multiple: true
104+
path: /tmp/digests
105+
106+
- name: Setup Docker buildx
107+
uses: docker/setup-buildx-action@v3
108+
with:
109+
driver-opts: |
110+
network=host
111+
112+
- name: Log into registry ${{ env.REGISTRY }}
113+
uses: docker/login-action@v3
114+
with:
115+
registry: ${{ env.REGISTRY }}
116+
username: ${{ env.USERNAME }}
117+
password: ${{ env.PASSWORD }}
118+
119+
- name: Extract Docker metadata
120+
id: meta
121+
uses: docker/metadata-action@v5
122+
with:
123+
images: |
124+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
125+
tags: |
126+
type=sha,enable=true,priority=100,prefix=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
127+
type=raw,value=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
128+
type=raw,value=pds-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
129+
130+
- name: Create manifest list and push
131+
id: merge
132+
working-directory: /tmp/digests
133+
run: |
134+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
135+
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
136+
137+
- name: Inspect image and get digest
138+
id: inspect
139+
run: |
140+
digest=$(docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$(echo '${{ steps.meta.outputs.tags }}' | head -1 | cut -d':' -f2) | grep "^Digest:" | awk '{print $2}')
141+
echo "digest=$digest" >> $GITHUB_OUTPUT
142+
143+
- name: Generate artifact attestation
144+
uses: actions/attest-build-provenance@v1
145+
with:
146+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
147+
subject-digest: ${{ steps.inspect.outputs.digest }}
148+
push-to-registry: true
149+
150+
- name: Checkout repository for tagging
151+
uses: actions/checkout@v5
152+
with:
153+
token: ${{ secrets.GITHUB_TOKEN }}
154+
155+
- name: Tag repository with datetime
156+
run: |
157+
DATETIME_TAG=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
158+
git config user.name "github-actions[bot]"
159+
git config user.email "github-actions[bot]@users.noreply.github.com"
160+
git tag -a "pds-$DATETIME_TAG" -m "Release pds-$DATETIME_TAG"
161+
git push origin "pds-$DATETIME_TAG"

.github/workflows/repo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
changeset:
7272
name: Changeset
7373
runs-on: ubuntu-latest
74+
if: false
7475
steps:
7576
- uses: actions/checkout@v4
7677
with:

packages/ozone/src/sequencer/sequencer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class Sequencer extends (EventEmitter as new () => SequencerEmitter) {
3535
this.lastSeen = curr ?? 0
3636
this.poll()
3737
this.conn = await this.db.pool.connect()
38-
this.conn.query(`listen ${LabelChannel}`) // if this errors, unhandled rejection should cause process to exit
38+
await this.conn.query(`listen ${LabelChannel}`)
3939
this.conn.on('notification', (notif) => {
4040
if (notif.channel === LabelChannel) {
4141
this.poll()

0 commit comments

Comments
 (0)