Automate Unfollow Non-Reciprocal Accounts #885
This file contains hidden or 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: Automate Unfollow Non-Reciprocal Accounts | |
| on: | |
| schedule: | |
| # Run every 8 hours (you can change it) | |
| - cron: "0 0/8 * * *" | |
| workflow_dispatch: # Allows manual runs from GitHub Actions UI | |
| jobs: | |
| unfollow-non-reciprocal: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| # Step 2: Set up Node.js | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' # Specify your Node.js version | |
| # Step 3: Install dependencies | |
| - name: Install dependencies | |
| run: | | |
| npm install axios dotenv | |
| # Step 4: Run the Unfollow Script | |
| - name: Run Unfollow Script | |
| env: | |
| GITHUB_USERNAME: ${{ secrets.USERNAME }} | |
| GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
| run: node unfollow.js |