Skip to content

Commit

Permalink
fix: random token generate
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Oct 9, 2023
1 parent 373abd0 commit de6817c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

set -eo pipefail

random_token() {
tr -dc A-Za-z0-9 </dev/urandom | head -c 32
echo ""
}

run() {
token="$(tr -dc A-Za-z0-9 </dev/urandom | head -c 10)"
token="$(random_token)"
echo "::stop-commands::${token}"
echo -e "\033[1;34m$*\033[0m"
echo "::${token}::"
Expand Down

0 comments on commit de6817c

Please sign in to comment.