Skip to content

readLike windows(自动阅读随机点赞) #1

readLike windows(自动阅读随机点赞)

readLike windows(自动阅读随机点赞) #1

name: bypassCF cron
on:
schedule:
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
timeout-minutes: 20
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Load environment variables
id: load-env
run: |
if ($env:USERNAMES -eq $null -or $env:USERNAMES -eq "") {
Write-Host "Loading environment variables from .env file"
Get-Content .env | ForEach-Object {
$name, $value = $_ -split '=', 2
Write-Host "::set-env name=$name::$value"
Write-Host "$name=$value" >> $env:GITHUB_ENV
}
}
else {
Write-Host "Using secrets"
Write-Host "USERNAMES=${{ secrets.USERNAMES_appin }}" >> $env:GITHUB_ENV
Write-Host "PASSWORDS=${{ secrets.PASSWORDS_appin }}" >> $env:GITHUB_ENV
Write-Host "WEBSITE=${{ secrets.WEBSITE_appin }}" >> $env:GITHUB_ENV
}
- name: Run a script
run: node bypasscf.js