Skip to content

Commit

Permalink
ci: Add git_ref for E2E test runs on Head (#5333)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam authored Dec 15, 2023
1 parent 47c82ea commit 246a9b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/actions/e2e/setup-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ runs:
PRIVATE_CLUSTER: ${{ inputs.private_cluster }}
GIT_REF: ${{ inputs.git_ref }}
run: |
if [[ "$GIT_REF" == '' ]]; then
GIT_REF=$(git rev-parse HEAD)
fi
# Create or Upgrade the cluster based on whether the cluster already exists
cmd="create"
eksctl get cluster --name "$CLUSTER_NAME" && cmd="upgrade"
Expand Down Expand Up @@ -188,8 +191,11 @@ runs:
env:
ACCOUNT_ID: ${{ inputs.account_id }}
CLUSTER_NAME: ${{ inputs.cluster_name }}
GIT_REF: ${{ inputs.git_ref }}
GIT_REF: ${{ inputs.git_ref }}
run: |
if [[ "$GIT_REF" == '' ]]; then
GIT_REF=$(git rev-parse HEAD)
fi
oidc_id=$(aws eks describe-cluster --name "$CLUSTER_NAME" --query "cluster.identity.oidc.issuer" --output text | cut -d '/' -f 3,4,5)
arn="arn:aws:iam::$ACCOUNT_ID:oidc-provider/${oidc_id}"
aws iam tag-open-id-connect-provider --open-id-connect-provider-arn $arn \
Expand Down

0 comments on commit 246a9b5

Please sign in to comment.