From 87d7811a459a3722e4d34cf753b884c3ac03919b Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Mon, 30 Dec 2024 23:24:45 -0500 Subject: [PATCH 1/2] Use github actor for CI_ORGANIZATION --- ci-info | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-info b/ci-info index aa6d7e9..707a50a 100755 --- a/ci-info +++ b/ci-info @@ -244,6 +244,7 @@ elif [ -n "$CIRCLE_COMPARE_URL" ] ; then elif [ -n "$GITHUB_HEAD_REF" ] ; then # GitHub Actions pull request (no special handling is required for non-PR GitHub Actions jobs). CI_IS_PULL_REQUEST=true + CI_ORGANIZATION="${GITHUB_ACTOR}" CI_BRANCH_NAME="${GITHUB_HEAD_REF}" CI_COMMIT_RANGE_START=$(git rev-parse "${GITHUB_BASE_REF}") CI_COMMIT_RANGE_END=$(git rev-parse "${GITHUB_HEAD_REF}") From 14c6b5f13b4f6bd7f2e6a9d98e169790b02dd60d Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Tue, 31 Dec 2024 12:29:48 -0500 Subject: [PATCH 2/2] Move set CI_ORGANIZATION along with other CI --- ci-info | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-info b/ci-info index 707a50a..f7fb19b 100755 --- a/ci-info +++ b/ci-info @@ -97,6 +97,8 @@ elif [ -n "$AZURE_HTTP_USER_AGENT" ]; then fi elif [ -n "$CIRCLE_PR_USERNAME" ]; then CI_ORGANIZATION="$CIRCLE_PR_USERNAME" +elif [ -n "$GITHUB_HEAD_REF" ]; then + CI_ORGANIZATION="${GITHUB_ACTOR}" fi ## Git clone @@ -244,7 +246,6 @@ elif [ -n "$CIRCLE_COMPARE_URL" ] ; then elif [ -n "$GITHUB_HEAD_REF" ] ; then # GitHub Actions pull request (no special handling is required for non-PR GitHub Actions jobs). CI_IS_PULL_REQUEST=true - CI_ORGANIZATION="${GITHUB_ACTOR}" CI_BRANCH_NAME="${GITHUB_HEAD_REF}" CI_COMMIT_RANGE_START=$(git rev-parse "${GITHUB_BASE_REF}") CI_COMMIT_RANGE_END=$(git rev-parse "${GITHUB_HEAD_REF}")