Skip to content

Commit

Permalink
Update env arg parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
  • Loading branch information
lewijacn committed Sep 18, 2024
1 parent 5051f56 commit eb6dcf9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 0 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ inputs:
runs:
using: "docker"
image: "Dockerfile"
env:
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
PR_REPO: "https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git"
PUSH_BRANCH: "${{ github.ref_name }}"
PUSH_REPO: "https://github.com/${{ github.repository }}.git"

branding:
icon: 'check-circle'
Expand Down
12 changes: 8 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
printenv

if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
branch_name="${PR_BRANCH}"
pr_repo_url="${PR_REPO}"
branch_name="${{ github.event.pull_request.head.ref }}"
#pr_repo_url="https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git"
else
branch_name="${PUSH_BRANCH}"
pr_repo_url="${PUSH_REPO}"
branch_name="${GITHUB_REF_NAME}"
#pr_repo_url="https://github.com/${{ github.repository }}.git"
fi
pr_repo_url="https://github.com/${GITHUB_REPOSITORY}.git"



echo "Running jenkins test on repo: $pr_repo_url and branch: $branch_name"
pipenv run python3 default_webhook_trigger.py \
--jenkins_url="${INPUT_JENKINS_URL}" \
Expand Down

0 comments on commit eb6dcf9

Please sign in to comment.