Daily pull request activity check #689
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: Daily pull request activity check | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| daily-job: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.8 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Get Pull Request Age | |
| env: | |
| DOKKU_HOST: ${{ secrets.DOKKU_HOST }} | |
| SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
| run: | | |
| set -x | |
| mkdir -p ~/.ssh | |
| ssh-keyscan ${{ secrets.DOKKU_HOST }}>> ~/.ssh/known_hosts | |
| eval `ssh-agent -s` | |
| ssh-add - <<< "$SSH_PRIVATE_KEY" | |
| echo deleting dokku app ${{ github.head_ref }} | |
| python .github/workflows/remove-inactive-pr-previews.py | |