Skip to content

Commit

Permalink
chore(ci): fix runner removal checks
Browse files Browse the repository at this point in the history
This check must be done for each runner registered on the fly (aws + hyperstack).
Also make runner listing through GitHub CLI more robust.
  • Loading branch information
soonum committed Nov 20, 2024
1 parent 7f2af17 commit 73d2995
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/removed_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: List runners
run: |
echo "RUNNERS_FOUND=$(gh api "repos/zama-ai/slab-github-runner/actions/runners" --jq '.runners[].name')" >> "${GITHUB_ENV}"
echo "RUNNERS_FOUND=$(gh api "repos/zama-ai/slab-github-runner/actions/runners" | jq -r '.runners[].name')" >> "${GITHUB_ENV}"
env:
GH_TOKEN: ${{ secrets.READ_REPO_TOKEN }}

Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/test_spawn_terminate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,22 @@ jobs:
job-secret: ${{ secrets.JOB_SECRET }}
label: ${{ matrix.runner }}

test-runner-removed:
name: Test runner is removed
needs: [ action-stop ]
test-runner-removed-aws:
name: Test runner is removed (AWS)
needs: [ action-start, action-stop ]
uses: ./.github/workflows/removed_runner.yml
with:
runner-name: ci-persistent-runner
runner-name: ${{ needs.action-start.outputs.runner-aws }}
must-exist: false
secrets:
READ_REPO_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}

test-runner-removed-hyperstack:
name: Test runner is removed (Hyperstack)
needs: [ action-start, action-stop ]
uses: ./.github/workflows/removed_runner.yml
with:
runner-name: ${{ needs.action-start.outputs.runner-hyperstack }}
must-exist: false
secrets:
READ_REPO_TOKEN: ${{ secrets.SLAB_ACTION_TOKEN }}

0 comments on commit 73d2995

Please sign in to comment.