File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Reproduce latest release
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 2 * * *' # every day at 02:00 night
7+
8+ jobs :
9+ reproduce :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v3
14+
15+ - name : Get latest release
16+ shell : bash
17+ run : |
18+ curl --proto '=https' \
19+ --tlsv1.2 \
20+ -sSf -L \
21+ 'https://api.github.com/repos/simplex-chat/simplexmq/releases/latest' \
22+ 2>/dev/null | \
23+ grep -i "tag_name" | \
24+ awk -F \" '{print "TAG="$4}' >> $GITHUB_ENV
25+
26+ - name : Execute reproduce script
27+ run : |
28+ ${GITHUB_WORKSPACE}/scripts/reproduce-builds.sh "$TAG"
29+
30+ - name : Check if build has been reproduced
31+ env :
32+ url : ${{ secrets.STATUS_SIMPLEX_WEBHOOK_URL }}
33+ user : ${{ secrets.STATUS_SIMPLEX_WEBHOOK_USER }}
34+ pass : ${{ secrets.STATUS_SIMPLEX_WEBHOOK_PASS }}
35+ run : |
36+ if [ -f "${GITHUB_WORKSPACE}/$TAG/_sha256sums" ]; then
37+ exit 0
38+ else
39+ curl --proto '=https' --tlsv1.2 -sSf \
40+ -u "${user}:${pass}" \
41+ -H 'Content-Type: application/json' \
42+ -d '{"title": "👾 GitHub: Runner", "description": "⛔️ '"$TAG"' did not reproduce."}' \
43+ "$url"
44+ exit 1
45+ fi
You can’t perform that action at this time.
0 commit comments