Skip to content

🤖 Alarm if The Number of GitHub Seats is Low #1042

🤖 Alarm if The Number of GitHub Seats is Low

🤖 Alarm if The Number of GitHub Seats is Low #1042

name: 🤖 Alarm if The Number of GitHub Seats is Low
on:
schedule:
- cron: "0 6,12,16 * * *" # Runs daily at 0600, 1200 and 1600
workflow_dispatch:
jobs:
low-seats-threshold:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.11"
cache: "pipenv"
- name: Install Pipenv
run: |
pip install pipenv
pipenv install
- run: pipenv run python3 -m bin.alert_on_low_github_licences
env:
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN_ENTERPRISE_DATA }}
ADMIN_SLACK_TOKEN: ${{ secrets.ADMIN_SEND_TO_SLACK }}
- 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 to check for low GitHub seats"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}