mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: duplicates
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 12 * * *'
|
|
push:
|
|
branches: [dev]
|
|
pull_request:
|
|
branches: [dev]
|
|
|
|
env:
|
|
REPO_OWNER: "gentoo"
|
|
REPO_NAME: "guru"
|
|
REPO_WORKFLOW: "duplicates.yml"
|
|
IRC_NICK: "guru-ci"
|
|
IRC_HOST: "irc.libera.chat"
|
|
IRC_PORT: "6697"
|
|
IRC_CHANNEL: "#gentoo-guru"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: codeberg-tiny-lazy
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Prepare job
|
|
run: |
|
|
LAST_STATUS=$(python ./scripts/last_status.py)
|
|
IRC_NOTIFY=${{ forgejo.repository == 'gentoo/guru' && forgejo.event_name != 'pull_request' }}
|
|
echo "last_status=${LAST_STATUS} irc_notify=${IRC_NOTIFY}"
|
|
echo "last_status=${LAST_STATUS}" >> "${FORGEJO_ENV}"
|
|
echo "irc_notify=${IRC_NOTIFY}" >> "${FORGEJO_ENV}"
|
|
|
|
- name: Setup master gentoo repository
|
|
run: |
|
|
./scripts/setup-master-gentoo.sh
|
|
|
|
- name: Check for duplicates
|
|
run: |
|
|
./scripts/check-duplicates.sh
|
|
|
|
- name: Inform failure on IRC
|
|
if: ${{ failure() && env.last_status == 'success' && fromJSON(env.irc_notify) }}
|
|
run: |
|
|
python ./scripts/irc_notify.py
|
|
env:
|
|
IRC_MESSAGE: CI failure detected on job ${{ forgejo.workflow }} - ${{ forgejo.server_url }}/${{ forgejo.repository }}/actions/runs/${{ forgejo.run_number }}
|
|
|
|
- name: Inform recovery on IRC
|
|
if: ${{ success() && env.last_status != 'success' && fromJSON(env.irc_notify) }}
|
|
run: |
|
|
python ./scripts/irc_notify.py
|
|
env:
|
|
IRC_MESSAGE: CI on job ${{ forgejo.workflow }} is green again. Thanks!
|