Skip to content

feat: add GitHub Actions workflow linters#332

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
Aliexe-code:add-workflow-linters
Feb 21, 2026
Merged

feat: add GitHub Actions workflow linters#332
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
Aliexe-code:add-workflow-linters

Conversation

@Aliexe-code
Copy link
Contributor

Summary

Fixes #327
Adds GitHub Actions workflow validation using actionlint to catch errors before merging.

Changes

  • Add actionlint tool to validate workflow YAML files
  • Add dev/tools/lint-workflows script
  • Add dev/ci/presubmits/lint-workflows presubmit check
  • Add .github/workflows/ci.yml to run lint and tests on PRs
  • Add make lint-workflows target

@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Feb 20, 2026
@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for agent-sandbox canceled.

Name Link
🔨 Latest commit c6f8933
🔍 Latest deploy log https://app.netlify.com/projects/agent-sandbox/deploys/69991689abb0080008af5cc6

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 20, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

Welcome @Aliexe-code!

It looks like this is your first PR to kubernetes-sigs/agent-sandbox 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/agent-sandbox has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 20, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @Aliexe-code. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 20, 2026
@janetkuo
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 20, 2026
@janetkuo
Copy link
Member

@Aliexe-code To fix the "The list of commits with invalid commit messages" error, you'll need to remove Fixes kubernetes-sigs#327 from your commit message.

go-version-file: go.mod

- name: Run Unit Tests
run: ./dev/ci/presubmits/test-unit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the presubmit tests in CI are running on prow, instead of being handled by GitHub Actions. Currently, all changes to .github/workflows are skipped in prow, ref kubernetes/test-infra#36482

Suggest using GitHub Action to trigger validation only on .github/workflows changes.
https://github.com/marketplace/actions/rhysd-actionlint might be a good tool to use here.
You'll only need to modify .github/workflows in this PR, and won't need to modify dev/ and Makefile.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Feb 20, 2026
@k8s-ci-robot
Copy link
Contributor

@Aliexe-code: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
presubmit-agent-sandbox-e2e-test 56331d2 link true /test presubmit-agent-sandbox-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

- Add CI workflow using rhysd/actionlint to validate workflow files
- Triggers only on changes to .github/workflows/**
@janetkuo
Copy link
Member

The test failure comes from this known flake: #326

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 21, 2026
- uses: actions/checkout@v4

- name: Run actionlint
uses: rhysd/actionlint@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use devops-actions/actionlint@v0.1.10 wrapper from the Marketplace, to make using it easier. Please take a look at the user guide: https://github.com/marketplace/actions/rhysd-actionlint

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
Copy link
Member

@janetkuo janetkuo Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For safety, let's keep the permission read-only (remove L12-14). We should be able to see error logs in the job runs, so we don't need to grant it permission to modify PRs. This change lgtm after this is fixed.

@janetkuo janetkuo self-assigned this Feb 21, 2026
Copy link
Member

@janetkuo janetkuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Aliexe-code, janetkuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2026
@k8s-ci-robot k8s-ci-robot merged commit 9b643db into kubernetes-sigs:main Feb 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linters for GitHub actions

3 participants