ci: extract + fix await-published logic
This commit is contained in:
parent
fea7eebb15
commit
723fe1e4ac
|
@ -19,23 +19,9 @@ jobs:
|
|||
- name: Set TAG
|
||||
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: Wait for published
|
||||
run: |
|
||||
i=0
|
||||
pkg="bpmn-js@${{ env.TAG }}"
|
||||
|
||||
until [ $i -gt 10 ]
|
||||
do
|
||||
echo "Checking for $pkg in npm registry..."
|
||||
|
||||
info=$(npm info $pkg)
|
||||
if [[ "$info" != "" ]]; then
|
||||
echo "Found."
|
||||
break
|
||||
fi
|
||||
|
||||
((i++))
|
||||
sleep 15s
|
||||
done
|
||||
env:
|
||||
PKG: 'bpmn-js@${{ env.TAG }}'
|
||||
run: tasks/stages/await-published
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
shopt -s inherit_errexit nullglob
|
||||
|
||||
i=0
|
||||
pkg="$PKG"
|
||||
until [ $i -gt 10 ]
|
||||
do
|
||||
echo "Checking for $pkg in npm registry ($((i+1))/10)"
|
||||
info=$(npm info $pkg)
|
||||
if [[ "$info" != "" ]]; then
|
||||
echo "Found."
|
||||
break
|
||||
fi
|
||||
|
||||
i=$((var+1))
|
||||
sleep 15s
|
||||
done
|
Loading…
Reference in New Issue