Skip to content
Latchkey

handle the /support command workflow (kubernetes/kubeadm)

The handle the /support command workflow from kubernetes/kubeadm, explained and optimized by Latchkey.

A

CI health: A - excellent

The optimized version below adds job timeouts.

Source: kubernetes/kubeadm.github/workflows/support-command.yamlLicense Apache-2.0View source

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

workflow (.yml)
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_commentname: handle the /support commandpermissions: {}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 uses latchkey-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.

Actions used in this workflow

xt0rted/slash-command-action ben-z/actions-comment-on-issue actions-ecosystem/action-add-labels peter-evans/close-issue

Frequently asked questions

What does the handle the /support command workflow (kubernetes/kubeadm) workflow do?
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.
What CI health grade does this workflow get?
This Automation and other workflow grades A. Paste your own workflow into the Latchkey grader to see its grade and the exact fixes.
How can I improve this Automation and other workflow?
Apply job timeouts. Latchkey applies these automatically on managed runners when you point runs-on at Latchkey.

References