Skip to content

Commit 4f1ac3f

Browse files
committed
use single-quotes and grep with here strings
1 parent b5f6315 commit 4f1ac3f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/build-in-devcontainer.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ jobs:
9797
9898
rapids-make-${PYTHON_PACKAGE_MANAGER}-env;
9999
100-
if test -n "${{ inputs.extra-repo-deploy-key }}" \
101-
|| test -n "${{ inputs.extra-repo-deploy-key-2 }}"; then
100+
if ! grep -qE "^$" <<< '${{ secrets[inputs.extra-repo-deploy-key] }}' \
101+
|| ! grep -qE "^$" <<< '${{ secrets[inputs.extra-repo-deploy-key-2] }}'; then
102102
if ! pgrep ssh-agent >/dev/null 2>&1; then eval "$(ssh-agent -s)"; fi;
103-
if test -n "${{ inputs.extra-repo-deploy-key }}"; then
104-
ssh-add - <<< "${{ secrets[inputs.extra-repo-deploy-key] }}";
103+
if ! grep -qE "^$" <<< '${{ secrets[inputs.extra-repo-deploy-key] }}'; then
104+
ssh-add - <<< '${{ secrets[inputs.extra-repo-deploy-key] }}';
105105
fi
106-
if test -n "${{ inputs.extra-repo-deploy-key-2 }}"; then
107-
ssh-add - <<< "${{ secrets[inputs.extra-repo-deploy-key-2] }}";
106+
if ! grep -qE "^$" <<< '${{ secrets[inputs.extra-repo-deploy-key-2] }}'; then
107+
ssh-add - <<< '${{ secrets[inputs.extra-repo-deploy-key-2] }}';
108108
fi
109109
devcontainer-utils-init-ssh-deploy-keys || true;
110110
fi

0 commit comments

Comments
 (0)