Skip to content

Commit

Permalink
Create workflow to bounce the Inflators
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Nov 25, 2024
1 parent e33e363 commit 53b2138
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/actions/netkan/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: NetKAN
description: Run commands in the NetKAN container

inputs:
AWS_ACCESS_KEY_ID:
description: Credentials for AWS
required: true
AWS_SECRET_ACCESS_KEY:
description: Credentials for AWS
required: true
AWS_DEFAULT_REGION:
description: Region for AWS
required: true
args:
description: The command to run
required: true

runs:
using: docker
image: kspckan/netkan
env:
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ inputs.AWS_DEFAULT_REGION }}
args:
- ${{ input.args }}
21 changes: 21 additions & 0 deletions .github/workflows/bounce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Bounce the Inflators
on:
workflow_dispatch:

jobs:
bounce:
strategy:
matrix:
game:
- Ksp
- Ksp2
name: Bounce the ${{ matrix.game }} Inflator
runs-on: ubuntu-latest
steps:
- name: Run NetKAN redeploy command for ${{ matrix.game }}
uses: ./.github/actions/netkan
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-2
args: redeploy-service --cluster NetKANCluster --service-name Inflator${{ matrix.game }}

0 comments on commit 53b2138

Please sign in to comment.