🤖 Add GitHub Members to Root Team (MoJAS) #9
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: 🤖 Add GitHub Members to Root Team (MoJAS) | |
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" | |
- run: python3 -m pip install -r requirements.txt | |
- run: python3 -m bin.add_users_all_org_members_github_team | |
env: | |
ADMIN_GITHUB_TOKEN: ${{ secrets.GH_BOT_PAT_TOKEN }} | |
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 }} |