Update sync_warp-go.yml

dependabot/github_actions/docker/setup-buildx-action-2.6.0
fscarmen 3 years ago committed by GitHub
parent dce0cb51c1
commit ea112c9091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      .github/workflows/sync_warp-go.yml

@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3.4.0
- name: Update warp-go to latest version
run: |
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/${{ env.REPO }}/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2)
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ github.repository }}/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)
if [ "$LATEST" != "$NOW" ]; then
[ ! -d ${GITHUB_WORKSPACE}/warp-go ] && mkdir -p ${GITHUB_WORKSPACE}/warp-go
@ -46,16 +46,14 @@ jobs:
echo "VERSION=$LATEST" >> $GITHUB_ENV
echo "DIST=${GITHUB_WORKSPACE}/warp-go" >> $GITHUB_ENV
echo "DATE=$(date "+%Y/%m/%d %H:%M:%S")" >> $GITHUB_ENV
fi
- name: Upload to REPO
- name: Upload to repository
uses: stefanzweifel/git-auto-commit-action@v4.16.0
if: ${{ env.VERSION != '' }}
run: |
git config --global user.email "${{ env.EMAIL }}"
git config --global user.name "${{ env.USERNAME }}"
git add .
git commit -m "Sync warp-go to V${{ env.VERSION }} by Github Actions, $(date "+%Y/%m/%d %H:%M:%S")"
git push
with:
commit_message: Sync warp-go to V${{ env.VERSION }} by Github Actions, ${{ env.DATE }}
- name: Release binaries
uses: softprops/action-gh-release@v1

Loading…
Cancel
Save