From 045f96fd581ddb8d356a99a6015361084232a5b0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 22 Dec 2023 15:51:24 +0000 Subject: [PATCH] Allow element-web hash to be specified when calling playwright tests workflow (#12087) --- .github/workflows/element-web.yaml | 7 ++++++- scripts/ci/layered.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/element-web.yaml b/.github/workflows/element-web.yaml index 7b085d892d..0582ff4e52 100644 --- a/.github/workflows/element-web.yaml +++ b/.github/workflows/element-web.yaml @@ -29,6 +29,10 @@ on: type: string required: false description: "The Git SHA of matrix-js-sdk to build against. By default, will use a matching branch name if it exists, or develop." + element-web-sha: + type: string + required: false + description: "The Git SHA of element-web to build against. By default, will use a matching branch name if it exists, or develop." concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} @@ -55,8 +59,9 @@ jobs: - name: Fetch layered build id: layered_build env: - # tell layered.sh to check out the right sha of the JS-SDK, if we were given one + # tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }} + ELEMENT_WEB_GITHUB_BASE_REF: ${{ inputs.element-web-sha }} run: | scripts/ci/layered.sh JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD) diff --git a/scripts/ci/layered.sh b/scripts/ci/layered.sh index b55cb77647..aeb3694de1 100755 --- a/scripts/ci/layered.sh +++ b/scripts/ci/layered.sh @@ -42,6 +42,7 @@ yarn install --frozen-lockfile # Finally, set up element-web scripts/fetchdep.sh vector-im element-web develop pushd element-web +[ -n "$ELEMENT_WEB_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $ELEMENT_WEB_GITHUB_BASE_REF && git checkout $ELEMENT_WEB_GITHUB_BASE_REF yarn link matrix-js-sdk yarn link matrix-react-sdk yarn install --frozen-lockfile