mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-01-17 14:18:17 +01:00
22 lines
664 B
YAML
22 lines
664 B
YAML
name: Sends Daily AWS Costs to Slack
|
|
on:
|
|
# Allow manual Run
|
|
workflow_dispatch:
|
|
# Run at 7:00 UTC every day
|
|
schedule:
|
|
- cron: "0 7 * * *"
|
|
jobs:
|
|
aws_costs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get Costs
|
|
env:
|
|
AWS_KEY: ${{ secrets.COST_AWS_ACCESS_KEY }}
|
|
AWS_SECRET: ${{ secrets.COST_AWS_SECRET_KEY }}
|
|
AWS_REGION: ${{ secrets.COST_AWS_REGION }}
|
|
SLACK_CHANNEL: ${{ secrets.SLACK_COST_CHANNEL }}
|
|
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
|
|
run: |
|
|
npm install -g aws-cost-cli
|
|
aws-cost -k $AWS_KEY -s $AWS_SECRET -r $AWS_REGION -S $SLACK_TOKEN -C $SLACK_CHANNEL
|