From b26f16207ccceafb6f401aff2cd3e9af33ebb110 Mon Sep 17 00:00:00 2001 From: Erika Gili Date: Mon, 27 Jan 2025 15:55:35 +0100 Subject: [PATCH] Refactor env variables --- .github/workflows/test-playwright.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-playwright.yml b/.github/workflows/test-playwright.yml index 992058d6..3532699e 100644 --- a/.github/workflows/test-playwright.yml +++ b/.github/workflows/test-playwright.yml @@ -98,20 +98,25 @@ jobs: .forEach(envVar => core.exportVariable(envVar.name, envVar.value)); - name: Set up SSH - if: ${{ secrets.GITHUB_USER_SSH_KEY != '' }} + env: + GITHUB_USER_SSH_KEY: ${{ secrets.GITHUB_USER_SSH_KEY }} + if: ${{ env.GITHUB_USER_SSH_KEY != '' }} uses: webfactory/ssh-agent@v0.9.0 with: - ssh-private-key: ${{ secrets.GITHUB_USER_SSH_KEY }} + ssh-private-key: ${{ env.GITHUB_USER_SSH_KEY }} - name: Set up Git - if: ${{ secrets.GITHUB_USER_EMAIL != '' && secrets.GITHUB_USER_NAME != '' }} + env: + GITHUB_USER_EMAIL: ${{ secrets.GITHUB_USER_EMAIL }} + GITHUB_USER_NAME: ${{ secrets.GITHUB_USER_NAME }} + if: ${{ env.GITHUB_USER_EMAIL != '' && env.GITHUB_USER_NAME != '' }} run: | - git config --global user.email "${{ secrets.GITHUB_USER_EMAIL }}" - git config --global user.name "${{ secrets.GITHUB_USER_NAME }}" + git config --global user.email "${{ env.GITHUB_USER_EMAIL }}" + git config --global user.name "${{ env.GITHUB_USER_NAME }}" - name: Check if PHP installation is needed run: | - if [ "${{ hashFiles('composer.json') }}" != '' && "${{inputs.PHP_VERSION }}" != '' ]; then + if [ "${{ hashFiles('composer.json') }}" != '' && "${{ inputs.PHP_VERSION }}" != '' ]; then echo "PHP_CHECK=true" >> $GITHUB_ENV fi