Skip to content

Commit

Permalink
add if new version to send webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbarnabedikartola committed Nov 4, 2023
1 parent 4d6d41b commit d2c255f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/Remake-PKGBUILD-and-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
git config --local user.email "${{ secrets.GIT_USER }}@users.noreply.github.com"
git config --local user.name "${{ secrets.GIT_USER }}"
if [ -n "$(git commit -m "new version" -a | grep "nothing to commit")" ];then exit 0; fi
echo "newVer=true" >> $GITHUB_ENV
- name: Push changes
uses: ad-m/github-push-action@master
Expand All @@ -54,4 +55,6 @@ jobs:
- name: Send Hooks BigLinux Build Package
shell: bash
run: |
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}", "branch_build": "${{ github.event.client_payload.branch_build }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches
if [ "$newVer" = "true" ];then
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}", "branch_build": "${{ github.event.client_payload.branch_build }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches
fi

0 comments on commit d2c255f

Please sign in to comment.