40 lines
957 B
YAML
40 lines
957 B
YAML
|
name: Daily Domain Check
|
||
|
|
||
|
on:
|
||
|
schedule:
|
||
|
- cron: "0 0 * * *" # Runs daily at midnight
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
domain_check:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Set up Python
|
||
|
uses: actions/setup-python@v3
|
||
|
with:
|
||
|
python-version: '3.x'
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: |
|
||
|
python -m pip install --upgrade pip
|
||
|
# Add any other dependencies your script needs here
|
||
|
|
||
|
- name: Run domain check
|
||
|
run: python domain_check.py
|
||
|
|
||
|
- name: Save output with date
|
||
|
run: |
|
||
|
today=$(date +%Y-%m-%d)
|
||
|
mv domain.txt "domain_$today.txt"
|
||
|
|
||
|
- name: Create release and upload result
|
||
|
run: |
|
||
|
today=$(date +%Y-%m-%d)
|
||
|
gitea release create --title "Domain Check $today" --assets "domain_$today.txt"
|
||
|
env:
|
||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|