2023-06-21 21:19:55 +00:00
|
|
|
name: Fly Cleanup
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Once a day, clean up jobs marked as expired
|
|
|
|
- cron: '50 12 * * *'
|
|
|
|
|
|
|
|
# Allows running this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clean:
|
|
|
|
name: Clean stale deployed apps
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository_owner == 'gristlabs'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
|
|
|
with:
|
2023-08-01 08:18:52 +00:00
|
|
|
version: 0.1.66
|
2023-06-21 21:19:55 +00:00
|
|
|
- run: node buildtools/fly-deploy.js clean
|