Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/lifecycle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Scheduled infrastructure management
on:
schedule:
- cron: '0 13 * * 1,2,3,4,5' # launch at 8:00 AM EST
- cron: '0 23 * * 1,2,3,4,5' # teardown at 6:00 PM EST
jobs:
launch:
if: github.event.schedule == '0 13 * * 1,2,3,4,5'
runs-on: ubuntu-latest
environment: pulumi
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Flox
uses: flox/install-flox-action@v2
- name: Deploy with Pulumi
uses: flox/activate-action@v1
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
with:
command: |
cd infrastructure
uv run pulumi up --yes
nu ping.nu
teardown:
if: github.event.schedule == '0 23 * * 1,2,3,4,5'
runs-on: ubuntu-latest
environment: pulumi
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Flox
uses: flox/install-flox-action@v2
- name: Dismantle with Pulumi
uses: flox/activate-action@v1
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
with:
command: |
cd infrastructure
uv run pulumi down --yes