From d39a8f83a7c4e28cc558090b8e01f638fac829d9 Mon Sep 17 00:00:00 2001 From: Mohammad Hafijul Islam Date: Wed, 29 Jan 2025 17:57:46 +0600 Subject: [PATCH] event added --- .github/workflows/dispatch-change-event.yml | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/dispatch-change-event.yml diff --git a/.github/workflows/dispatch-change-event.yml b/.github/workflows/dispatch-change-event.yml new file mode 100644 index 0000000..735de1f --- /dev/null +++ b/.github/workflows/dispatch-change-event.yml @@ -0,0 +1,27 @@ +name: "Dispatch Change Event" +on: + push: + branches: + - main + +jobs: + build: + name: Deployment to Server + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Executing the CURL Command + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.UAT_HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.UAT_KEY_FILE }} + script: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.REPO_DISPATCH_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/mt-technologies-ltd/lebu-pay-api/dispatches \ + -d '{"event_type":"AIRTIME_MAIN_CHANGE"}'