Housekeeping json file #501
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: Housekeeping Shutdown form | |
run-name: Housekeeping json file | |
on: | |
schedule: | |
- cron: '00 17 * * *' | |
workflow_dispatch: | |
env: | |
GH_TOKEN: ${{ secrets.PLATFORM_USER_TOKEN }} | |
jobs: | |
parse: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
token: ${{ env.GH_TOKEN }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install python-dateutil | |
run: | | |
pip3 install python-dateutil | |
- name: Delete old entries | |
continue-on-error: true | |
run: | | |
python ./scripts/housekeeping.py | |
- name: Commit to master | |
continue-on-error: true | |
if: env.JSON_FILE_EXISTS == 'true' | |
run: | | |
git config user.name hmcts-platform-operations | |
git config user.email [email protected] | |
git add . | |
git commit -m "housekeeping" | |
git push | |
- name: Close Stale Issues | |
uses: actions/[email protected] | |
with: | |
days-before-stale: 7 | |
only-labels: Error in form | |