From 48318e3192bc9abdf6c9d0748bf3f5e13d72f579 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Tue, 7 Jul 2026 13:42:58 +0000 Subject: [PATCH] Avoid the remaining expression interpolations in CI workflow scripts --- .github/workflows/docker.yml | 4 ++-- .github/workflows/latest_deps.yml | 8 ++++++-- .github/workflows/tests.yml | 4 +++- .github/workflows/twisted_trunk.yml | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bdcceae418..9491bde94c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -67,7 +67,7 @@ jobs: - name: Compute vault jwt role name id: vault-jwt-role run: | - echo "role_name=github_service_management_$( echo "${{ github.repository }}" | sed -r 's|[/-]|_|g')" | tee -a "$GITHUB_OUTPUT" + echo "role_name=github_service_management_$( echo "$GITHUB_REPOSITORY" | sed -r 's|[/-]|_|g')" | tee -a "$GITHUB_OUTPUT" - name: Get team registry token id: import-secrets @@ -168,7 +168,7 @@ jobs: - name: Compute vault jwt role name id: vault-jwt-role run: | - echo "role_name=github_service_management_$( echo "${{ github.repository }}" | sed -r 's|[/-]|_|g')" | tee -a "$GITHUB_OUTPUT" + echo "role_name=github_service_management_$( echo "$GITHUB_REPOSITORY" | sed -r 's|[/-]|_|g')" | tee -a "$GITHUB_OUTPUT" - name: Get team registry token id: import-secrets diff --git a/.github/workflows/latest_deps.yml b/.github/workflows/latest_deps.yml index 51f1396694..25a4db804b 100644 --- a/.github/workflows/latest_deps.yml +++ b/.github/workflows/latest_deps.yml @@ -38,7 +38,9 @@ jobs: should_run_workflow: ${{ steps.check_condition.outputs.should_run_workflow }} steps: - id: check_condition - run: echo "should_run_workflow=${{ github.repository == 'element-hq/synapse' }}" >> "$GITHUB_OUTPUT" + env: + SHOULD_RUN_WORKFLOW: ${{ github.repository == 'element-hq/synapse' }} + run: echo "should_run_workflow=$SHOULD_RUN_WORKFLOW" >> "$GITHUB_OUTPUT" mypy: needs: check_repo @@ -95,11 +97,13 @@ jobs: - run: sudo apt-get -qq install xmlsec1 - name: Set up PostgreSQL ${{ matrix.postgres-version }} if: ${{ matrix.postgres-version }} + env: + POSTGRES_VERSION: ${{ matrix.postgres-version }} run: | docker run -d -p 5432:5432 \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \ - postgres:${{ matrix.postgres-version }} + "postgres:$POSTGRES_VERSION" - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.x" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56301e9524..265d1ca4af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -456,13 +456,15 @@ jobs: if: ${{ matrix.job.postgres-version }} # 1. Mount postgres data files onto a tmpfs in-memory filesystem to reduce overhead of docker's overlayfs layer. # 2. Expose the unix socket for postgres. This removes latency of using docker-proxy for connections. + env: + POSTGRES_VERSION: ${{ matrix.job.postgres-version }} run: | docker run -d -p 5432:5432 \ --tmpfs /var/lib/postgres:rw,size=6144m \ --mount 'type=bind,src=/var/run/postgresql,dst=/var/run/postgresql' \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \ - postgres:${{ matrix.job.postgres-version }} + "postgres:$POSTGRES_VERSION" - name: Install Rust uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master diff --git a/.github/workflows/twisted_trunk.yml b/.github/workflows/twisted_trunk.yml index d686740930..2f6b2941a7 100644 --- a/.github/workflows/twisted_trunk.yml +++ b/.github/workflows/twisted_trunk.yml @@ -37,7 +37,9 @@ jobs: should_run_workflow: ${{ steps.check_condition.outputs.should_run_workflow }} steps: - id: check_condition - run: echo "should_run_workflow=${{ github.repository == 'element-hq/synapse' }}" >> "$GITHUB_OUTPUT" + env: + SHOULD_RUN_WORKFLOW: ${{ github.repository == 'element-hq/synapse' }} + run: echo "should_run_workflow=$SHOULD_RUN_WORKFLOW" >> "$GITHUB_OUTPUT" mypy: needs: check_repo