mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-25 11:11:31 +01:00
* tests: use stable MAS integration in Synapse * Automatically follow MAS main branch * Update the pinned Synapse container image to latest develop * Update element-web-playwright-common to 1.4.5 * Fix the typing of the MAS config * Update playwright-common to 1.4.6 * Use the modern MAS -> Synapse API * Relax MAS rate limiting * Revert using the modern API explicitly, it is now the default * Better adjust the MAS rate limits
58 lines
2.3 KiB
YAML
58 lines
2.3 KiB
YAML
name: Update Playwright docker images
|
|
on:
|
|
workflow_dispatch: {}
|
|
schedule:
|
|
- cron: "0 6 * * *" # Every day at 6am UTC
|
|
permissions: {}
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
|
|
- name: Update synapse image
|
|
run: |
|
|
docker pull "$IMAGE"
|
|
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
|
DIGEST=${INSPECT#*@}
|
|
sed -i "s/const TAG.*/const TAG = \"develop@$DIGEST\";/" playwright/testcontainers/synapse.ts
|
|
env:
|
|
IMAGE: ghcr.io/element-hq/synapse:develop
|
|
|
|
- name: Update MAS image
|
|
run: |
|
|
docker pull "$IMAGE"
|
|
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
|
DIGEST=${INSPECT#*@}
|
|
sed -i "s/const TAG.*/const TAG = \"main@$DIGEST\";/" playwright/testcontainers/mas.ts
|
|
env:
|
|
IMAGE: ghcr.io/element-hq/matrix-authentication-service:main
|
|
|
|
- name: Create Pull Request
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
|
|
with:
|
|
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
branch: actions/playwright-image-updates
|
|
delete-branch: true
|
|
title: Playwright Docker image updates
|
|
labels: |
|
|
T-Task
|
|
|
|
- name: Enable automerge
|
|
run: gh pr merge --merge --auto "$PR_NUMBER"
|
|
if: steps.cpr.outputs.pull-request-operation == 'created'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
|
|
|
|
- name: Enable autoapprove
|
|
run: |
|
|
gh pr review --approve "$PR_NUMBER"
|
|
if: steps.cpr.outputs.pull-request-operation == 'created'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
|