Skip to content

🤖 Alarm for Low Gandi Funds #176

🤖 Alarm for Low Gandi Funds

🤖 Alarm for Low Gandi Funds #176

name: 🤖 Alarm for Low Gandi Funds
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
jobs:
alarm-for-low-gandi-funds:
name: Run the check to see if more Gandi funds are needed.
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: checkout repo content
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Python Setup
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11'
cache: "pipenv"
- name: Install Pipenv
run: |
pip install pipenv
pipenv install
- name: execute the low gandi funds script
run: pipenv run python3 -m bin.alert_on_low_gandi_funds
env:
GANDI_FUNDS_TOKEN: ${{ secrets.GANDI_FUNDS_TOKEN }}
GANDI_ORG_ID: ${{ secrets.GANDI_ORG_ID }}
ADMIN_SLACK_TOKEN: ${{ secrets.ADMIN_SEND_TO_SLACK }}
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2.5.0
with:
status: ${{ job.status }}
notify_when: 'failure'
notification_title: 'Failed GitHub Action Run'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}