Update warp-go.yml

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 9d04c1bf2d
commit e82f7f5e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .github/workflows/warp-go.yml

@ -12,12 +12,13 @@ jobs:
env:
USERNAME: ${{ secrets.GH_USERNAME }}
EMAIL: ${{ secrets.GH_EMAIL }}
REPO: ${{ secrets.GH_REPO }}
steps:
- uses: actions/checkout@v3
- name: Update warp-go to latest version
run: |
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/warp/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2)
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/${{ env.REPO }}/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2)
LATEST=$(wget -qO- -T1 -t1 https://gitlab.com/api/v4/projects/ProjectWARP%2Fwarp-go/releases | grep -oP '"tag_name":"v\K[^\"]+' | head -n 1)
NOW1=$(echo $NOW | cut -d \. -f1)
NOW2=$(echo $NOW | cut -d \. -f2)
@ -47,7 +48,7 @@ jobs:
done
for j in "${SCRIPTS[@]}"; do
wget -O ${GITHUB_WORKSPACE}/$j https://raw.githubusercontent.com/${{ env.USERNAME }}/test/main/"$j"
wget -O ${GITHUB_WORKSPACE}/$j https://raw.githubusercontent.com/${{ env.USERNAME }}/${{ env.REPO }}/main/"$j"
sed -i "s/$NOW/$LATEST/g" ${GITHUB_WORKSPACE}/$j
done

Loading…
Cancel
Save