File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
.github/scripts/ppc64le/self-hosted-builder Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ ExecStartPre=-/usr/local/bin/gh_token_generator.sh /etc/actions-runner/%i/appid.
1212ExecStartPre =-/usr/local/bin/gh_cat_token.sh /etc/actions-runner/%i/ghtoken.env /etc/actions-runner/%i/ghtoken.socket
1313
1414# Wait for token to be written to the pipe
15- #ExecStartPre=/bin/bash -c 'while [ ! -s /etc/actions-runner/%i/ghtoken.socket ]; do sleep 1; done'
16- ExecStartPre =/bin/bash -c 'while [ ! -e /etc/actions-runner/%i/ghtoken.socket ]; do sleep 1; done'
15+ ExecStartPre =/bin/bash -c 'while [ ! -s /etc/actions-runner/%i/ghtoken.txt ]; do sleep 1; done'
1716
1817ExecStart =/usr/bin/docker run \
1918 --env-file =/etc/actions-runner/%i/env \
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33TOKEN_FILE=$1
4- TOKEN_PIPE =$2
4+ OUTPUT_FILE =$2
55
6- echo " Starting gh_cat_token.sh with TOKEN_FILE=${TOKEN_FILE} , TOKEN_PIPE =${TOKEN_PIPE } "
6+ echo " Starting gh_cat_token.sh with TOKEN_FILE=${TOKEN_FILE} , OUTPUT_FILE =${OUTPUT_FILE } "
77
88# Validate inputs
99if [[ ! -r " ${TOKEN_FILE} " ]]; then
1010 echo " Error: Token file '${TOKEN_FILE} ' does not exist or is not readable."
1111 exit 1
1212fi
1313
14- if [[ -e " ${TOKEN_PIPE} " ]]; then
15- echo " Removing existing pipe ${TOKEN_PIPE} "
16- rm -f " ${TOKEN_PIPE} "
17- fi
18-
19- mkfifo " ${TOKEN_PIPE} "
20- echo " Created FIFO ${TOKEN_PIPE} "
21-
22- # Write token file contents to pipe
23- cat " ${TOKEN_FILE} " > " ${TOKEN_PIPE} " &
24- echo " Token written to pipe ${TOKEN_PIPE} "
14+ # Write the token to the output file
15+ cat " ${TOKEN_FILE} " > " ${OUTPUT_FILE} "
16+ echo " Token written to ${OUTPUT_FILE} "
You can’t perform that action at this time.
0 commit comments