Jackett/.github/workflows/issuebot.yml

52 lines
2.4 KiB
YAML
Raw Normal View History

2024-01-23 06:06:03 +00:00
#
name: Redeliver failed webhook deliveries
# This workflow runs every 6 hours or when manually triggered.
on:
schedule:
2024-01-23 06:37:29 +00:00
- cron: '40 */6 * * *'
2024-01-23 06:06:03 +00:00
workflow_dispatch:
# This workflow will use the built in `GITHUB_TOKEN` to check out the repository contents. This grants `GITHUB_TOKEN` permission to do that.
permissions:
contents: read
#
jobs:
redeliver-failed-deliveries:
name: Redeliver failed deliveries
runs-on: ubuntu-latest
if: github.repository == 'Jackett/Jackett'
2024-01-23 06:06:03 +00:00
steps:
# This workflow will run a script that is stored in the repository. This step checks out the repository contents so that the workflow can access the script.
- name: Check out repo content
uses: actions/checkout@v4
# This step sets up Node.js. The script that this workflow will run uses Node.js.
- name: Setup Node.js
uses: actions/setup-node@v4
2024-01-23 06:06:03 +00:00
with:
node-version: '18.x'
2024-01-23 06:06:03 +00:00
# This step installs the octokit library. The script that this workflow will run uses the octokit library.
- name: Install dependencies
run: npm install octokit
# This step sets some environment variables, then runs a script to find and redeliver failed webhook deliveries.
2024-01-23 06:37:29 +00:00
# - Replace `YOUR_APP_ID_SECRET_NAME` with the name of the secret where you stored your app ID.
# - Replace `YOUR_PRIVATE_KEY_SECRET_NAME` with the name of the secret where you stored your private key.
# - Replace `YOUR_TOKEN_SECRET_NAME` with the name of the secret where you stored your personal access token.
2024-01-23 06:06:03 +00:00
# - Replace `YOUR_LAST_REDELIVERY_VARIABLE_NAME` with the name that you want to use for a configuration variable that will be stored in the repository where this workflow is stored. The name can be any string that contains only alphanumeric characters and `_`, and does not start with `GITHUB_` or a number. For more information, see "[AUTOTITLE](/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows)."
2024-01-23 06:37:29 +00:00
2024-01-23 06:06:03 +00:00
- name: Run script
env:
2024-01-23 06:37:29 +00:00
APP_ID: ${{ secrets.PROBOT_ID }}
PRIVATE_KEY: ${{ secrets.PROBOT_KEY }}
TOKEN: ${{ secrets.PROBOT_TOKEN }}
2024-01-23 19:09:29 +00:00
LAST_REDELIVERY_VARIABLE_NAME: 'PROBOT_TIME'
2024-01-23 06:37:29 +00:00
WORKFLOW_REPO: ${{ github.event.repository.name }}
2024-01-23 06:06:03 +00:00
WORKFLOW_REPO_OWNER: ${{ github.repository_owner }}
run: |
2024-05-29 03:36:23 +00:00
node .github/workflows/scripts/redeliver-failed-deliveries.mjs