From bde38bff85d39ec246692444353fd7d1fb53681c Mon Sep 17 00:00:00 2001 From: Steven Quan Date: Thu, 21 Mar 2024 12:02:57 +0000 Subject: [PATCH] updating due to requested changes --- action.yml | 24 +----------------------- scripts/script.sh | 8 ++++---- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/action.yml b/action.yml index 477882d..bf8ba35 100644 --- a/action.yml +++ b/action.yml @@ -18,15 +18,6 @@ inputs: description: Set to true in order to enable timestamps on log messages required: false default: 'true' - repo-org: - description: Github Org to use for PR comment - required: true - repo-name: - description: Github Repo Name to use for PR comment - required: true - pr-number: - description: PR number to be used for PR comment - required: true aws-account-id: description: AWS account ID to use for ECR repo required: true @@ -39,17 +30,7 @@ inputs: use-alpha: description: AWS ECR Repo Alpha image required: true - default: 'false' - - -# TODO(user): Define your outputs here -outputs: - some-output: - description: 'Some output description' - some-output: - description: 'Some output description' - some-output: - description: 'Some output description' + default: 'true' runs: using: 'docker' @@ -58,9 +39,6 @@ runs: DEBUG_MODE: ${{ inputs.debug-mode }} LOG_LEVEL: ${{ inputs.log-level }} LOG_TIMESTAMPED: ${{ inputs.log-timestamped }} - REPO_ORG: ${{ inputs.repo-org }} - REPO_NAME: ${{ inputs.repo-name }} - PR_NUMBER: ${{ inputs.pr-number }} AWS_ACCOUNT_ID: ${{ inputs.aws-account-id }} ECR_REPO_NAME: ${{ inputs.ecr-repo-name }} ECR_REPO_TAG: ${{ inputs.ecr-repo-tag }} diff --git a/scripts/script.sh b/scripts/script.sh index 5ea64cb..94eca73 100755 --- a/scripts/script.sh +++ b/scripts/script.sh @@ -4,9 +4,9 @@ . "$(dirname "$0")/utils/script-utils.sh" . "$(dirname "$0")/utils/gh-utils.sh" -check_env_var "REPO_ORG" -check_env_var "REPO_NAME" -check_env_var "PR_NUMBER" +REPO_ORG=${GITHUB_REPOSITORY_OWNER} +REPO_NAME=$(echo "${GITHUB_REPOSITORY}" |cut -d "/" -f2) +PR_NUMBER=${GITHUB_SHA} check_env_var "AWS_ACCOUNT_ID" check_env_var "ECR_REPO_NAME" check_env_var "ECR_REPO_TAG" @@ -46,4 +46,4 @@ comment_on_pull_request "${REPO_ORG}" \ "${_scan_results_comment}" \ "true" \ "scan-results:${_scan_repo_name}" - + \ No newline at end of file