Skip to content

Commit

Permalink
test: update wf test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhengqbbb committed Nov 27, 2023
1 parent 5c993eb commit f9a5780
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .github/workflow.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/cowsay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
git_email: [email protected]
CONCURRENCY: 10
steps:
- uses: x-cmd/action@main
# - uses: x-cmd/action@main
- uses: x-cmd/action@v0
with:
code: |
echo "Hello World"
Expand Down
31 changes: 15 additions & 16 deletions .x-cmd/test
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# shellcheck shell=sh disable=SC1091,SC2034,SC3043 #xsh
# shellcheck shell=dash

# Section: Arg
WORK_DIR="$(x wsroot)"
(
if ! x gh --cur --get config 1> /dev/null; then
printf "%s\n" "Not config please check the token"
return 1
fi

# Section: Main
if ! x gh token 1> /dev/null; then
printf "%s\n" "Not user please check the token and user permission"
return 1
fi

while read -r _id; do
x gh action workflow run --repo x-cmd/action "$_id"
done <<A
$(command awk '{ if( $1 != "#" ) print $2; }' <"${WORK_DIR}/.github/workflow.yml")
while read -r _id; do
x gh action workflow run --repo x-cmd/action "$_id"
done <<A
24985679
26208510
24541493
24541494
24534142
A

# dispatch inputs test
# echo '{"name":"action test"}' | x gh action workflow dispatch --repo x-cmd/action --inputs - 24534142

)

0 comments on commit f9a5780

Please sign in to comment.