From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7E28515806E for ; Thu, 18 May 2023 08:21:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 639E9E07D0; Thu, 18 May 2023 08:21:32 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45FECE07D0 for ; Thu, 18 May 2023 08:21:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DCFD340C8A for ; Thu, 18 May 2023 08:21:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AE75CA67 for ; Thu, 18 May 2023 08:21:29 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1684397927.69cbd3bb1b006841e041fd816628c11c6611c168.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: .github/workflows/ X-VCS-Repository: repo/proj/guru X-VCS-Files: .github/workflows/pkgcheck.yml X-VCS-Directories: .github/workflows/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 69cbd3bb1b006841e041fd816628c11c6611c168 X-VCS-Branch: dev Date: Thu, 18 May 2023 08:21:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4b42d920-48fe-4ce1-9945-6b40e8fecb09 X-Archives-Hash: 1b62197278c9a5a0aee653a2b0a716c1 commit: 69cbd3bb1b006841e041fd816628c11c6611c168 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Thu May 18 08:09:21 2023 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Thu May 18 08:18:47 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=69cbd3bb pkgcheck.yml: notify on recoveries too Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> .github/workflows/pkgcheck.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pkgcheck.yml b/.github/workflows/pkgcheck.yml index 32ce5ba8b..18911e4fe 100644 --- a/.github/workflows/pkgcheck.yml +++ b/.github/workflows/pkgcheck.yml @@ -12,18 +12,41 @@ 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=pkgcheck.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: Run pkgcheck uses: pkgcore/pkgcheck-action@v1 with: args: --keywords=-RedundantVersion,-NonsolvableDepsInDev - - 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!