Skip to content

🤖 Add GitHub Members to Root Team (MoJ) #1030

🤖 Add GitHub Members to Root Team (MoJ)

🤖 Add GitHub Members to Root Team (MoJ) #1030

name: 🤖 Add GitHub Members to Root Team (MoJ)
on:
workflow_dispatch:
schedule:
- cron: "0 8,10,12,14,16 * * 1-5"
jobs:
run-script:
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 python3 -m bin.add_users_all_org_members_github_team
env:
ADMIN_GITHUB_TOKEN: ${{ secrets.OPS_ENG_GENERAL_ADMIN_BOT_PAT }}
GITHUB_ORGANIZATION_NAME: ministryofjustice
LOGGING_LEVEL: ${{ secrets.LOGGING_LEVEL }}
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@472601e839b758e36c455b5d3e5e1a217d4807bd # 2.5.0
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Failed GitHub Action Run"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}