From d2f1486cd8db047a07dd908bda6dcd1318f8ae35 Mon Sep 17 00:00:00 2001 From: Youssef Dhraief Date: Fri, 22 Mar 2024 13:18:58 +0100 Subject: [PATCH] fix: added missing pr number input (#4) --- action.yml | 4 ++++ scripts/script.sh | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 99aea76..feb0d4b 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,9 @@ inputs: description: AWS ECR Repo Alpha image required: false default: 'true' + pr-number: + description: The current pull request number + required: true runs: using: 'docker' @@ -43,3 +46,4 @@ runs: ECR_REPO_NAME: ${{ inputs.ecr-repo-name }} ECR_REPO_TAG: ${{ inputs.ecr-repo-tag }} USE_ALPHA_REGISTRY: ${{ inputs.use-alpha }} + PR_NUMBER: ${{ inputs.pr-number }} diff --git a/scripts/script.sh b/scripts/script.sh index d63f727..c1c0981 100755 --- a/scripts/script.sh +++ b/scripts/script.sh @@ -5,10 +5,11 @@ 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" +check_env_var "PR_NUMBER" check_env_var "USE_ALPHA_REGISTRY" if [[ "$(check_bool "${USE_ALPHA_REGISTRY}")" ]]; then