mirror of https://github.com/vector-im/riot-web
Switch to ghcr.io image for Synapse (#12869)
Due to dockerhub rate-limiting Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>dbkr/sss
parent
6ca4f670bf
commit
1be4c12fd2
|
@ -9,14 +9,14 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Update matrixdotorg/synapse image
|
- name: Update synapse image
|
||||||
run: |
|
run: |
|
||||||
docker pull "$IMAGE"
|
docker pull "$IMAGE"
|
||||||
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
||||||
DIGEST=${INSPECT#*@}
|
DIGEST=${INSPECT#*@}
|
||||||
sed -i "s/const DOCKER_TAG.*/const DOCKER_TAG = \"develop@$DIGEST\";/" playwright/plugins/homeserver/synapse/index.ts
|
sed -i "s/const DOCKER_TAG.*/const DOCKER_TAG = \"develop@$DIGEST\";/" playwright/plugins/homeserver/synapse/index.ts
|
||||||
env:
|
env:
|
||||||
IMAGE: matrixdotorg/synapse:develop
|
IMAGE: ghcr.io/element-hq/synapse:develop
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: cpr
|
id: cpr
|
||||||
|
|
|
@ -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:
|
There are a few different ways to run the tests yourself. The simplest is to run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker pull matrixdotorg/synapse:develop
|
docker pull ghcr.io/element-hq/synapse:develop
|
||||||
yarn run test:playwright
|
yarn run test:playwright
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,10 @@ import { Docker } from "../../docker";
|
||||||
import { HomeserverConfig, HomeserverInstance, Homeserver, StartHomeserverOpts, Credentials } from "..";
|
import { HomeserverConfig, HomeserverInstance, Homeserver, StartHomeserverOpts, Credentials } from "..";
|
||||||
import { randB64Bytes } from "../../utils/rand";
|
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.
|
// 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.
|
// 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">> {
|
async function cfgDirFromTemplate(opts: StartHomeserverOpts): Promise<Omit<HomeserverConfig, "dockerUrl">> {
|
||||||
const templateDir = path.join(__dirname, "templates", opts.template);
|
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}...`);
|
console.log(`Starting synapse with config dir ${synCfg.configDir}...`);
|
||||||
const dockerSynapseParams = ["-v", `${synCfg.configDir}:/data`, "-p", `${synCfg.port}:8008/tcp`];
|
const dockerSynapseParams = ["-v", `${synCfg.configDir}:/data`, "-p", `${synCfg.port}:8008/tcp`];
|
||||||
const synapseId = await this.docker.run({
|
const synapseId = await this.docker.run({
|
||||||
image: `matrixdotorg/synapse:${DOCKER_TAG}`,
|
image: `ghcr.io/element-hq/synapse:${DOCKER_TAG}`,
|
||||||
containerName: `react-sdk-playwright-synapse`,
|
containerName: `react-sdk-playwright-synapse`,
|
||||||
params: dockerSynapseParams,
|
params: dockerSynapseParams,
|
||||||
cmd: ["run"],
|
cmd: ["run"],
|
||||||
|
|
Loading…
Reference in New Issue