diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 201f8da..8e9a652 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,10 @@ on: pull_request: types: [opened, synchronize] push: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: @@ -24,20 +23,20 @@ jobs: - name: Build and Test with Maven run: mvn clean install - - name: Notify on PR creation - if: github.event_name == 'pull_request' && github.event.action == 'opened' - run: | - curl -X POST ${{ secrets. CI_BOT }} \ - -H 'Content-type: application/json' \ - --data "{ - \"text\": \"📣 *New Pull Request Created*\n*Repo:* ${{ github.repository }}\n*Author:* ${{ github.actor }}\n*Link:* ${{ github.event.pull_request.html_url }}\" - }" - - - name: Notify on Build Failure - if: failure() - run: | - curl -X POST ${{ secrets. CI_BOT }} \ - -H 'Content-type: application/json' \ - --data "{ - \"text\": \"❌ *Build Failed*\n*Repo:* ${{ github.repository }}\n*Actor:* ${{ github.actor }}\n*Workflow:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\" - }" + - name: Notify on PR creation + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + run: | + curl -X POST ${{ secrets.CI_BOT }} \ + -H 'Content-type: application/json' \ + --data "{ + \"text\": \"📣 *New Pull Request Created*\n*Repo:* ${{ github.repository }}\n*Author:* ${{ github.actor }}\n*Link:* ${{ github.event.pull_request.html_url }}\" + }" + + - name: Notify on Build Failure + if: failure() + run: | + curl -X POST ${{ secrets.CI_BOT }} \ + -H 'Content-type: application/json' \ + --data "{ + \"text\": \"❌ *Build Failed*\n*Repo:* ${{ github.repository }}\n*Actor:* ${{ github.actor }}\n*Workflow:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\" + }"