🤖 Alarm if The Number of GitHub Seats is Low #18
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: 🤖 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@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- run: python3 -m pip install -r requirements.txt | |
- 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@v2 | |
with: | |
status: ${{ job.status }} | |
notify_when: "failure" | |
notification_title: "Failed to check for low GitHub seats" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |