handle the /support command workflow (kubernetes/kubeadm)
The handle the /support command workflow from kubernetes/kubeadm, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the handle the /support command workflow from the kubernetes/kubeadm repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
on: issue_comment
name: handle the /support command
permissions: {}
jobs:
support_comment:
permissions:
issues: write
runs-on: ubuntu-24.04
steps:
- name: check for the /support command
id: command
uses: xt0rted/slash-command-action@bf51f8f5f4ea3d58abc7eca58f77104182b23e88 # v2.0.0
continue-on-error: true
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: support
reaction: "false"
allow-edits: "true"
permission-level: admin
- name: comment with support text
if: steps.command.outputs.command-name
uses: ben-z/actions-comment-on-issue@402eb412a8f396be0d4ac52a823ec7121206cc26 # 1.0.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
Hello, @${{ github.event.issue.user.login }} :wave: :robot:
You seem to have troubles using Kubernetes and kubeadm.
Note that our issue trackers **should not** be used for providing support to users.
There are special channels for that purpose.
Please see:
- https://github.com/kubernetes/kubeadm#support
- name: add support label
if: steps.command.outputs.command-name
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
with:
labels: kind/support
- name: close issue
if: steps.command.outputs.command-name
uses: peter-evans/close-issue@a700eac5bf2a1c7a8cb6da0c13f93ed96fd53dbe # v1.0.3
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
on: issue_comment name: handle the /support command permissions: {} jobs: support_comment: timeout-minutes: 30 permissions: issues: write runs-on: latchkey-small steps: - name: check for the /support command id: command uses: xt0rted/slash-command-action@bf51f8f5f4ea3d58abc7eca58f77104182b23e88 # v2.0.0 continue-on-error: true with: repo-token: ${{ secrets.GITHUB_TOKEN }} command: support reaction: "false" allow-edits: "true" permission-level: admin - name: comment with support text if: steps.command.outputs.command-name uses: ben-z/actions-comment-on-issue@402eb412a8f396be0d4ac52a823ec7121206cc26 # 1.0.3 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: | Hello, @${{ github.event.issue.user.login }} :wave: :robot: You seem to have troubles using Kubernetes and kubeadm. Note that our issue trackers **should not** be used for providing support to users. There are special channels for that purpose. Please see: - https://github.com/kubernetes/kubeadm#support - name: add support label if: steps.command.outputs.command-name uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3 with: labels: kind/support - name: close issue if: steps.command.outputs.command-name uses: peter-evans/close-issue@a700eac5bf2a1c7a8cb6da0c13f93ed96fd53dbe # v1.0.3
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.