diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ea1161..b8c4e04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,7 +209,9 @@ jobs: notify_diffs: runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: | + (github.event_name == 'push' && github.ref == 'refs/heads/master') || + (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) needs: parse steps: - name: Checkout repository @@ -231,10 +233,7 @@ jobs: TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_UPDATE }} run: | - LAST_COMMIT_MESSAGE=$(git log -1 --pretty=%B) - if [[ "$LAST_COMMIT_MESSAGE" == Merge* ]]; then - python3 update_diffs.py --token ${{ secrets.TELEGRAM_BOT_TOKEN }} --chat_id ${{ secrets.TELEGRAM_CHAT_ID_UPDATE }} --base_commit HEAD~1 - fi + python3 update_diffs.py --token ${{ secrets.TELEGRAM_BOT_TOKEN }} --chat_id ${{ secrets.TELEGRAM_CHAT_ID_UPDATE }} --base_commit HEAD~1 backup: