Skip to content

ci: update workflow file for bill #4

ci: update workflow file for bill

ci: update workflow file for bill #4

Workflow file for this run

name: Check DigitalOcean Bill
on:
schedule:
- cron: "0 16 * * *" # run once a day at 12 AM (philippine standard time)
workflow_dispatch:
jobs:
curl:
runs-on: ubuntu-latest
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
steps:
- name: GET /v2/customers/my/balance
run: |
MONTH_TO_DATE_USAGE=$(curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/customers/my/balance" | jq > '.month_to_date_usage')
echo "MONTH_TO_DATE_USAGE=$MONTH_TO_DATE_USAGE" >> $GITHUB_ENV
- name: "this month bill: ${{ env.MONTH_TO_DATE_USAGE }}"
run: echo "this month bill: ${{ env.MONTH_TO_DATE_USAGE }}"

Check failure on line 23 in .github/workflows/check-bill.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-bill.yaml

Invalid workflow file

You have an error in your yaml syntax on line 23