digitalocean_gc.yml 925 B

1234567891011121314151617181920212223242526
  1. name: DigitalOcean
  2. on:
  3. workflow_dispatch:
  4. workflow_call:
  5. jobs:
  6. garbage-collection:
  7. runs-on: ubuntu-latest
  8. permissions:
  9. contents: read
  10. steps:
  11. - name: Install doctl
  12. uses: digitalocean/action-doctl@5727c67aa3c2c34ae9462d5a0ecfea8a1b31e5ce # v2
  13. with:
  14. token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
  15. - name: Run garbage collection
  16. run: |
  17. # --force: Required for CI to skip confirmation prompts
  18. # --include-untagged-manifests: Deletes unreferenced manifests to maximize space
  19. doctl registry garbage-collection start --force --include-untagged-manifests
  20. - name: Send email on failure
  21. uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1
  22. if: ${{ failure() }}
  23. with:
  24. smtp_username: ${{ secrets.SMTP_USERNAME }}
  25. smtp_password: ${{ secrets.SMTP_PASSWORD }}