aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-06-14 15:13:59 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-06-14 15:14:41 +0500
commit872f11e38d73b9a179a67e34f2da861d6015e3e4 (patch)
tree2af28b71d4482f670b5d30ba48559b182190e963 /.github/workflows
parentx11-misc/i3status-rust: drop 0.31.6 (diff)
downloadguru-872f11e38d73b9a179a67e34f2da861d6015e3e4.tar.gz
guru-872f11e38d73b9a179a67e34f2da861d6015e3e4.tar.bz2
guru-872f11e38d73b9a179a67e34f2da861d6015e3e4.zip
.github/workflows/duplicates.yml: inform recoveries
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/duplicates.yml29
1 files 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!