public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anna Vyalkova" <cyber+gentoo@sysrq.in>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: .github/workflows/
Date: Wed, 14 Jun 2023 10:14:52 +0000 (UTC)	[thread overview]
Message-ID: <1686737681.872f11e38d73b9a179a67e34f2da861d6015e3e4.cybertailor@gentoo> (raw)

commit:     872f11e38d73b9a179a67e34f2da861d6015e3e4
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jun 14 10:13:59 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed Jun 14 10:14:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=872f11e3

.github/workflows/duplicates.yml: inform recoveries

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 .github/workflows/duplicates.yml | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/duplicates.yml b/.github/workflows/duplicates.yml
index 20a593e50..bfefcb992 100644
--- a/.github/workflows/duplicates.yml
+++ b/.github/workflows/duplicates.yml
@@ -12,7 +12,22 @@ jobs:
   build:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v3
+      - name: Prepare job
+        run: |
+          LAST_STATUS=$(gh run list -R ${GITHUB_REPOSITORY} \
+            --branch=dev \
+            --workflow=duplicates.yml \
+            --status=completed \
+            --json=event,conclusion \
+            --jq='first(.[] | select(.event != "pull_request")).conclusion'
+          )
+          IRC_NOTIFY=${{ github.repository == 'gentoo/guru' && github.event_name != 'pull_request' }}
+          echo "last_status=${LAST_STATUS}" >> "${GITHUB_ENV}"
+          echo "irc_notify=${IRC_NOTIFY}" >> "${GITHUB_ENV}"
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Check out repository
+        uses: actions/checkout@v3
         with:
           ref: dev
       - name: Setup master gentoo repository
@@ -21,11 +36,19 @@ jobs:
       - name: Check for duplicates
         run: |
           ./scripts/check-duplicates.sh
-      - name: Inform on IRC
-        if: ${{ failure() && github.repository == 'gentoo/guru' && github.event_name != 'pull_request' }}
+      - name: Inform failure on IRC
+        if: ${{ failure() && env.last_status == 'success' && fromJSON(env.irc_notify) }}
         uses: rectalogic/notify-irc@v1
         with:
           channel: "#gentoo-guru"
           server: "irc.libera.chat"
           nickname: "github-ci"
           message: CI failure detected on job ${{ github.workflow }} - ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+      - name: Inform recovery on IRC
+        if: ${{ success() && env.last_status != 'success' && fromJSON(env.irc_notify) }}
+        uses: rectalogic/notify-irc@v1
+        with:
+          channel: "#gentoo-guru"
+          server: "irc.libera.chat"
+          nickname: "github-ci"
+          message: CI on job ${{ github.workflow }} is green again. Thanks!


             reply	other threads:[~2023-06-14 10:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 10:14 Anna Vyalkova [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-18 18:04 [gentoo-commits] repo/proj/guru:dev commit in: .github/workflows/ Anna Vyalkova
2024-04-12 12:37 Anna Vyalkova
2023-05-18  8:21 Anna Vyalkova
2023-04-23 14:54 Anna Vyalkova
2023-04-23 14:14 Anna Vyalkova
2023-04-23 12:24 Anna Vyalkova
2023-04-23 12:15 Anna Vyalkova
2023-04-23 12:06 Anna Vyalkova
2023-04-20 15:20 Anna Vyalkova
2023-03-31 15:28 Anna Vyalkova
2023-03-17 11:42 Arthur Zamarin
2023-01-13 21:36 Julien Roy
2022-10-07 15:39 Arthur Zamarin
2022-04-14 13:39 Andrew Ammerlaan
2022-04-06 18:07 Arthur Zamarin
2021-02-18 11:23 Andrew Ammerlaan
2021-02-18 11:15 Andrew Ammerlaan
2021-02-16  7:52 Theo Anderson
2021-01-29 10:59 Andrew Ammerlaan
2021-01-28 11:01 Andrew Ammerlaan
2021-01-19 21:57 Andrew Ammerlaan
2021-01-19 21:18 Andrew Ammerlaan
2021-01-03 10:07 Andrew Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1686737681.872f11e38d73b9a179a67e34f2da861d6015e3e4.cybertailor@gentoo \
    --to=cyber+gentoo@sysrq.in \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox