openpanel/.github/workflows/domains.yml
2025-05-14 12:59:35 +02:00

38 lines
1.4 KiB
YAML

name: Check domains
on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
domain:
- https://openpanel.com
- https://openpanel.org
steps:
- name: Check domain SSL and registry expire date
id: check-domain
uses: codex-team/action-check-domain@v1
with:
url: ${{ matrix.domain }}
- name: Create issue for registry expiry
if: ${{ steps.check-domain.outputs.paid-till-days-left != '' && steps.check-domain.outputs.paid-till-days-left < 10 }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: ⚠️ ${{ matrix.domain }} — registry expires in ${{ steps.check-domain.outputs.paid-till-days-left }} days
body: 'Paid till: `${{ steps.check-domain.outputs.paid-till-date }}`'
- name: Create issue for SSL expiry
if: ${{ steps.check-domain.outputs.ssl-expire-days-left != '' && steps.check-domain.outputs.ssl-expire-days-left < 10 }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: 🧨 ${{ matrix.domain }} — SSL cert expires in ${{ steps.check-domain.outputs.ssl-expire-days-left }} days
body: 'Valid till: `${{ steps.check-domain.outputs.ssl-expire-date }}`'