Skip to content

Commit e8e13d0

Browse files
committed
Persist Control Plane token for cpflow steps
1 parent 1317de3 commit e8e13d0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • .github/actions/cpflow-setup-environment

.github/actions/cpflow-setup-environment/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ runs:
8383
exit 1
8484
fi
8585
86+
# Persist the token for later cpflow/cpln steps via env. Use a randomized
87+
# delimiter so a multiline token cannot terminate the heredoc early.
88+
delim="CPLN_TOKEN_$(openssl rand -hex 8)"
89+
{
90+
echo "CPLN_TOKEN<<${delim}"
91+
echo "${CPLN_TOKEN}"
92+
echo "${delim}"
93+
} >> "$GITHUB_ENV"
94+
8695
create_output=""
8796
if ! create_output="$(cpln profile create default --org "$ORG" 2>&1)"; then
8897
if ! echo "$create_output" | grep -qi "already exists"; then

0 commit comments

Comments
 (0)