nightly: use target_commitish for previous SHA detection instead of body parsing
This commit is contained in:
parent
467a994649
commit
0d260f4903
1 changed files with 4 additions and 3 deletions
|
|
@ -42,10 +42,11 @@ jobs:
|
|||
PREV=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"$API/repos/${GITHUB_REPOSITORY}/releases/tags/nightly" \
|
||||
| python3 -c "
|
||||
import json,sys,re
|
||||
import json,sys
|
||||
try:
|
||||
m = re.search(r'commit: ([0-9a-f]{40})', json.load(sys.stdin).get('body',''))
|
||||
print(m.group(1) if m else '')
|
||||
r = json.load(sys.stdin)
|
||||
sha = r.get('target_commitish','')
|
||||
print(sha if len(sha) == 40 else '')
|
||||
except Exception:
|
||||
print('')")
|
||||
if [ "$PREV" = "$SHA" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue