Skip to content

Commit

Permalink
Fix restarted workflows not triggering runners. (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlovic-ivan authored Jul 15, 2022
1 parent 74d9828 commit a1f50cc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/runners.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
name: Runners Deployment

on:
workflow_run:
workflows: ["CI"]
types:
- completed
- requested
workflow_dispatch:
inputs:
action:
description: 'Whether workflows is requested or completed'
required: true
type: choice
options:
- requested
- completed
run_id:
description: 'Id of the job that triggered the run'
required: true
job_id:
description: 'Id of the job that triggered the run'
required: true
run_attempt:
description: 'Run attempt'
required: true
label:
description: 'Job label'
required: true

jobs:
check-skipped:
Expand Down Expand Up @@ -38,7 +54,7 @@ jobs:
if: ${{ needs.check-skipped.outputs.skipped == 'false' }}
steps:
- name: Checkout main repo for config
if: github.event.action == 'requested'
if: github.event.inputs.action == 'requested'
uses: actions/checkout@v3
with:
path: ilgpu
Expand Down Expand Up @@ -73,13 +89,13 @@ jobs:
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SKIP_CONFIRMATIONS: "true"
PULUMI_SKIP_UPDATE_CHECK: "true"
PULUMI_STACK_NAME: ilgpu-ghrunner-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
LABEL: cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
PULUMI_STACK_NAME: ilgpu-ghrunner-${{ github.event.inputs.job_id }}
LABEL: ${{ github.event.inputs.label }}
OWNER: ${{ github.event.repository.owner.login }}
REPO: ${{ github.event.repository.name }}
working-directory: pulumi
run: |
case ${{ github.event.action }} in
case ${{ github.event.inputs.action }} in
'requested')
cp ../ilgpu/.github/workflows/runners/config.yaml Pulumi.$PULUMI_STACK_NAME.yaml
pulumi stack init $PULUMI_STACK_NAME
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runners/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ config:
ephemeral-github-runner-gcp:bootDiskType: pd-balanced
ephemeral-github-runner-gcp:machineImage: ubuntu-2004-focal-v20220419-ghr22920-nv47012906-20220527
ephemeral-github-runner-gcp:machineType: a2-highgpu-1g
ephemeral-github-runner-gcp:runnersCount: "6"
ephemeral-github-runner-gcp:runnersCount: "1"

0 comments on commit a1f50cc

Please sign in to comment.