Check URL Availability #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check URL Availability | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
workflow_dispatch: | |
jobs: | |
run-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install && npm install node-fetch | |
- name: Run script | |
env: | |
STATUS_REPORT_DATE: ${{ vars.STATUS_REPORT_DATE }} | |
UPTIME_API_TOKEN: ${{ secrets.UPTIME_API_TOKEN }} | |
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
run: node .github/scripts/checkStatus.js |