Skip to content

Commit

Permalink
wip: Add cloud instance life-cycle workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Mar 28, 2024
1 parent d9810cd commit ce56930
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/control-instance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Control Instance

on:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
start:
runs-on: self-hosted
if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/start') }}
steps:
- run: |
echo Starting instance associated with issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}
stop:
runs-on: self-hosted
if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/stop') }}
steps:
- run: |
echo Stoping instance associated with issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}
19 changes: 19 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Create Instance

on:
issues:
types: [ labeled ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
create:
runs-on: self-hosted
if: github.event.label.name == 'instance:requested'
steps:
- run: |
echo Creating instance associated with issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}

0 comments on commit ce56930

Please sign in to comment.