Pin playwright synapse docker image to 2 days ago (#12571)

* Pin playwright synapse docker image to 2 days ago

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Automatically update Synapse docker image using GHA PRs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-05-30 11:34:34 +01:00 committed by GitHub
parent 679b170bc5
commit aec15a6ac1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 51 additions and 1 deletions

View file

@ -25,6 +25,11 @@ import { Docker } from "../../docker";
import { HomeserverConfig, HomeserverInstance, Homeserver, StartHomeserverOpts, Credentials } from "..";
import { randB64Bytes } from "../../utils/rand";
// Docker tag to use for `matrixdotorg/synapse` 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:b41149e8bacb8c3b22b06bba186402a64b1810c92e70ed5518735f0e57ed8f06";
async function cfgDirFromTemplate(opts: StartHomeserverOpts): Promise<Omit<HomeserverConfig, "dockerUrl">> {
const templateDir = path.join(__dirname, "templates", opts.template);
@ -103,7 +108,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:develop",
image: `matrixdotorg/synapse:${DOCKER_TAG}`,
containerName: `react-sdk-playwright-synapse`,
params: dockerSynapseParams,
cmd: ["run"],