Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Filter Bad Tokens

Filter Bad Tokens #203

name: Filter Bad Tokens
on:
workflow_run:
workflows: ["Cleaning Data", "Check POE Token"]
types:
- completed
jobs:
filter:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.name == 'Cleaning Data') }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: main
- name: Pull latest changes
run: git pull
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Wait for 10 seconds
run: sleep 10s
- name: Run bad_token_remover.py script
run: |
cd poe_token_check
python bad_token_remover.py
- name: Commit changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add .
git commit -m "adding new valid poe tokens"
git push