File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 86
86
87
87
- name : Test project generation and workflow
88
88
run : bash tests/test_project.sh
89
+
90
+ - name : Wait success of generated project's workflow
91
+ env :
92
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
93
+ run : |
94
+ cd tests/tmp || exit 1
95
+ if ! git remote -v | grep -q pawamoy-testing; then
96
+ echo "Origin is not the testing repository, exiting..."
97
+ exit 1
98
+ fi
99
+ echo "Pushing to testing repository..."
100
+ git push --tags --force
101
+ while true; do
102
+ echo "Waiting 5 seconds..."
103
+ sleep 5
104
+ echo "Fetching CI workflow..."
105
+ if ! output=$(gh run list --repo pawamoy/pawamoy-testing --branch 0.1.1 --limit 1 --workflow "ci.yml" --json status,conclusion); then
106
+ continue
107
+ fi
108
+ status=$(jq -r ".[0].status" <<< "$output")
109
+ if [ "${status}" = "completed" ]; then
110
+ echo "Workflow completed!"
111
+ conclusion=$(jq -r ".[0].conclusion" <<< "$output")
112
+ echo "Status: ${conclusion}"
113
+ [ "${conclusion}" == "success" ] && break || exit 1
114
+ fi
115
+ done
116
+ echo "Delete all testing releases..."
117
+ for tag in $(gh release list --repo pawamoy/pawamoy-testing --json tagName --jq ".[].tagName"); do
118
+ gh release delete --repo pawamoy/pawamoy-testing --tag "${tag}" --yes --cleanup-tag
119
+ done
You can’t perform that action at this time.
0 commit comments