Repository navigation
86 lines (72 loc) · 2.67 KB
/
Copy pathexample-local-testing.yml
File metadata and controls
86 lines (72 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Example workflow for local Rotating Domains Checker script testing
# Use this when: Running in RotatingDomainsChecker repository itself for testing/debugging
# No cloning needed - uses local code
name: Rotating Domains Checker (Local Testing)
env:
NODE_VERSION: 24
on:
# Manual run only (for testing)
workflow_dispatch:
inputs:
mode:
description: 'Run mode'
required: false
default: 'test_dry'
type: choice
options:
- '' # Use config.yml setting
- 'prod_live' # Production mode with changes
- 'prod_dry' # Production mode without changes (git operations simulation)
- 'test_live' # Test directory with changes
- 'test_dry' # Test directory without changes (git operations simulation)
config-path:
description: 'Path to configuration file'
required: false
default: './config.yml'
type: string
filters-path:
description: 'Path to filters directory'
required: false
default: './'
type: string
jobs:
check-domains:
name: Rotating Domains Checker
runs-on: ubuntu-latest
permissions:
contents: write # Required for commits
pull-requests: write # Required for PR creation
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 1
- name: 🔧 Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: 📦 Install dependencies
run: npm ci
- name: 🔨 Build
run: npm run build
- name: 🚀 Run Rotating Domains Checker
run: |
# Configure git user for commits
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# Run the checker (code is already in current directory)
node dist/index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_CONFIG_PATH: ${{ github.event.inputs.config-path || './config.yml' }}
INPUT_MODE: ${{ github.event.inputs.mode || '' }}
INPUT_FILTERS_PATH: ${{ github.event.inputs.filters-path || './' }}
- name: 📋 Upload log file
if: always()
uses: actions/upload-artifact@v6
with:
name: rotating-domains-checker-log
path: logs/rotating-domains-checker.log
retention-days: 7