mirror of
https://github.com/element-hq/synapse.git
synced 2026-03-29 15:20:16 +00:00
use the same ref as ess-helm if it exists
This commit is contained in:
19
.github/workflows/tests.yml
vendored
19
.github/workflows/tests.yml
vendored
@@ -818,8 +818,27 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Get current branch name
|
||||
id: current-branch
|
||||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if branch exists in element-hq/ess-helm
|
||||
id: check-branch
|
||||
env:
|
||||
BRANCH_NAME: ${{ steps.current-branch.outputs.branch }}
|
||||
run: |
|
||||
API_URL="https://api.github.com/repos/element-hq/ess-helm/branches/$BRANCH_NAME"
|
||||
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" $API_URL)
|
||||
if [ "$RESPONSE" = "200" ]; then
|
||||
echo "ref=$BRANCH_NAME" | tee -a $GITHUB_OUTPUT
|
||||
else
|
||||
echo "ref=main" | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Install ESS test dependencies
|
||||
uses: element-hq/setup-ess-cluster-action@release/v2
|
||||
with:
|
||||
ess-helm-ref: ${{ steps.check-branch.outputs.ref }}
|
||||
|
||||
- name: Build Synapse docker image to local registry
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user