Skip to content

Commit

Permalink
ruby(ci): update var info step and add user info step
Browse files Browse the repository at this point in the history
  • Loading branch information
vpayno committed Oct 6, 2023
1 parent c30a3f5 commit 35e6f03
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
{
Expand Down

0 comments on commit 35e6f03

Please sign in to comment.