Skip to content

🤖 Archive Inactive Repos (MoJAS) #140

🤖 Archive Inactive Repos (MoJAS)

🤖 Archive Inactive Repos (MoJAS) #140

name: 🤖 Archive Inactive Repos (MoJAS)
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 1-5"
jobs:
archive-repos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pipenv"
- name: Install Pipenv
run: |
pip install pipenv
pipenv install
- run: pipenv run python -m bin.archive_repositories
env:
ADMIN_GITHUB_TOKEN: ${{ secrets.OPS_ENG_GENERAL_ADMIN_BOT_PAT }}
GITHUB_ORGANIZATION_NAME: moj-analytical-services
LOGGING_LEVEL: ${{ secrets.LOGGING_LEVEL }}
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Failed GitHub Action Run"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}