Actions执行文件位置修正
This commit is contained in:
39
.gitea/workflows/daily_domain_check.yml
Normal file
39
.gitea/workflows/daily_domain_check.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
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 }}
|
||||
Reference in New Issue
Block a user