From 35e6f0330f7ec3f3f0e54db84d4a7df979ac532d Mon Sep 17 00:00:00 2001 From: Victor Payno Date: Thu, 5 Oct 2023 08:59:44 -0700 Subject: [PATCH] ruby(ci): update var info step and add user info step --- .github/workflows/ruby.yml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2bd39db6..fc5abd89 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -21,8 +21,30 @@ jobs: exercise_count: ${{ steps.check_file_changed.outputs.exercise_count }} steps: - name: Check GitHub Vars - id: github-vars - run: set | grep -e ^CI -e ^GITHUB_ -e ^RUNNER_ + id: github-vars-check + run: |- + { + printf "\`\`\`text\n" + printf "Runner environment info:\n" + set | grep -e ^CI -e ^GITHUB_ -e ^RUNNER_ + printf "\`\`\`\n" + } | tee -a "${GITHUB_STEP_SUMMARY}" + - name: Check GitHub User + id: github-user-check + run: |- + # get user info for default gh container + { + printf "\`\`\`text\n" + printf "Container user info:\n" + who + printf "\n" + id + printf "\n" + printf "HOME: %s\n" "${HOME}" + printf "\n" + printf "SHELL: %s\n" "$(getent passwd "${USER}" | awk -F: '{print $NF}')" + printf "\`\`\`\n" + } | tee -a "${GITHUB_STEP_SUMMARY}" - name: Checkout Repo id: checkout-repo uses: actions/checkout@v3 @@ -41,17 +63,6 @@ jobs: printf "\n" } | tee -a "${GITHUB_STEP_SUMMARY}" - # get user info for default gh container - { - printf "\`\`\`text\n" - printf "Container user info:\n" - who - printf "\n" - id - printf "\`\`\`\n" - } | tee -a "${GITHUB_STEP_SUMMARY}" - printf "\n" - # Diff HEAD with the previous commit then output to stdout. GIT_DIFF="$(git diff --name-only HEAD^ HEAD | tee /tmp/changed_files.txt)" {