Skip to content

Commit 7595b22

Browse files
authored
Merge pull request #416 from JuliaParallel/jps/ci-actions-once
CI: Only check for custom cmds once
2 parents 46cae33 + c778d9b commit 7595b22

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/CustomCommands.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ jobs:
1010
- name: Wait for commands
1111
id: read_commands
1212
run: |
13-
while true; do
14-
ci_commands=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X GET "${{ github.event.pull_request.comments_url }}" | jq -r ".[] | select(.body | startswith(\"/run-actions\")) | .body")
15-
if [ ! -z "$ci_commands" ]; then
16-
echo "Read commands $ci_commands"
17-
echo "ci_commands=$ci_commands" >> $GITHUB_OUTPUT
18-
break
19-
fi
20-
sleep 30
21-
done
13+
ci_commands=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X GET "${{ github.event.pull_request.comments_url }}" | jq -r ".[] | select(.body | startswith(\"/run-actions\")) | .body")
14+
if [ ! -z "$ci_commands" ]; then
15+
echo "Read commands $ci_commands"
16+
echo "ci_commands=$ci_commands" >> $GITHUB_OUTPUT
17+
break
18+
fi
2219
2320
- uses: actions/checkout@v3
2421
- uses: julia-actions/setup-julia@v1

0 commit comments

Comments
 (0)