diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..4f51f0d --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,36 @@ +on: pull_request + +env: + PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }} + PUSHOVER_USER: ${{ secrets.PUSHOVER_USER }} + +jobs: + lint-code: + runs-on: self-hosted + name: PingMe + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.29 + + - name: Notification for checks failure + uses: kha7iq/pingme-action@v1 + if: failure() + env: + PUSHOVER_TITLE: '🟢 New Request: ${{ github.ref }}' + PUSHOVER_MESSAGE: 'Event is triggerd by ${{ github.event_name }} Checks ❌ ${{ job.status }}' + with: + service: pushover + + - name: Notification for checks passing + uses: kha7iq/pingme-action@v1 + if: success() + env: + PUSHOVER_TITLE: '🟢 New Request: ${{ github.ref }}' + PUSHOVER_MESSAGE: 'Event is triggerd by ${{ github.event_name }} Checks ✅ ${{ job.status }}' + with: + service: pushover