Switch to ghcr.io image for Synapse (#12869)

Due to dockerhub rate-limiting

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-08-06 18:02:50 +01:00 committed by GitHub
parent 6ca4f670bf
commit 1be4c12fd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -9,14 +9,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Update matrixdotorg/synapse image
- name: Update synapse image
run: |
docker pull "$IMAGE"
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
DIGEST=${INSPECT#*@}
sed -i "s/const DOCKER_TAG.*/const DOCKER_TAG = \"develop@$DIGEST\";/" playwright/plugins/homeserver/synapse/index.ts
env:
IMAGE: matrixdotorg/synapse:develop
IMAGE: ghcr.io/element-hq/synapse:develop
- name: Create Pull Request
id: cpr

View file

@ -29,7 +29,7 @@ need to have Docker installed and working in order to run the Playwright tests.
There are a few different ways to run the tests yourself. The simplest is to run:
```shell
docker pull matrixdotorg/synapse:develop
docker pull ghcr.io/element-hq/synapse:develop
yarn run test:playwright
```

View file

@ -25,10 +25,10 @@ import { Docker } from "../../docker";
import { HomeserverConfig, HomeserverInstance, Homeserver, StartHomeserverOpts, Credentials } from "..";
import { randB64Bytes } from "../../utils/rand";
// Docker tag to use for `matrixdotorg/synapse` image.
// Docker tag to use for synapse docker image.
// We target a specific digest as every now and then a Synapse update will break our CI.
// This digest is updated by the playwright-image-updates.yaml workflow periodically.
const DOCKER_TAG = "develop@sha256:37e50604408ec07e1add96a38c3c97559e321a9f2764bd4d132bc2fb172c73e6";
const DOCKER_TAG = "develop@sha256:f8613aeda996b6e9c2235c8141cc8e9a65eb25ed7bcd932505e5dd3c9231b748";
async function cfgDirFromTemplate(opts: StartHomeserverOpts): Promise<Omit<HomeserverConfig, "dockerUrl">> {
const templateDir = path.join(__dirname, "templates", opts.template);
@ -110,7 +110,7 @@ export class Synapse implements Homeserver, HomeserverInstance {
console.log(`Starting synapse with config dir ${synCfg.configDir}...`);
const dockerSynapseParams = ["-v", `${synCfg.configDir}:/data`, "-p", `${synCfg.port}:8008/tcp`];
const synapseId = await this.docker.run({
image: `matrixdotorg/synapse:${DOCKER_TAG}`,
image: `ghcr.io/element-hq/synapse:${DOCKER_TAG}`,
containerName: `react-sdk-playwright-synapse`,
params: dockerSynapseParams,
cmd: ["run"],