Skip to content

Commit

Permalink
start and stop runner with lambda (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlee0423 authored Jan 18, 2024
1 parent f2fda03 commit da87260
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/docker_image_main_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@ on:
workflow_dispatch:

jobs:
start-runner:
runs-on: ubuntu-latest
steps:
- name: start runner
uses: gagoar/invoke-aws-lambda@master
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FunctionName: StartCirohRunner

- name: wait runner up
shell: bash
run: |
sleep 300
deps:
needs: start-runner
uses: ./.github/workflows/docker_deps_image.yml
secrets: inherit
troute:
Expand Down Expand Up @@ -67,4 +82,14 @@ jobs:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
job-status: ${{ env.JOBSTATUS }}
pull_request_url: ${{ github.event.pull_request.html_url }}
head_commit_url: ${{ github.event.head_commit.url }}
head_commit_url: ${{ github.event.head_commit.url }}
stop-runner:
needs: slack
runs-on: ubuntu-latest
steps:
- name: stop runner
uses: gagoar/invoke-aws-lambda@master
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FunctionName: StopCirohRunner

0 comments on commit da87260

Please sign in to comment.