Skip to content

chore: adds github linter#1327

Merged
stalniy merged 1 commit intomainfrom
chore/actionlint
May 16, 2025
Merged

chore: adds github linter#1327
stalniy merged 1 commit intomainfrom
chore/actionlint

Conversation

@stalniy
Copy link
Contributor

@stalniy stalniy commented May 16, 2025

Why

To ensure that our github actions are healthy at CI time, not after we merge and find out something doesn't work

What

Adds actionlint GHA action to lint github actions/workflows

Summary by CodeRabbit

  • Chores
    • Added automated linting for GitHub Actions workflows and action files on pull requests to the main branch, improving workflow quality and consistency.
    • Improved robustness of GitHub Actions workflows by enhancing shell script variable handling and quoting.
    • Removed the workflow for deploying the console web app to Google Cloud Platform.

@stalniy stalniy requested a review from a team as a code owner May 16, 2025 08:33
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 16, 2025

Walkthrough

A new GitHub Actions workflow named "GitHub Actions Linting" has been introduced. It runs on pull requests to the main branch, specifically when changes are made to workflow or action files. The workflow checks out the code and uses the actionlint tool to lint these files, with certain warnings suppressed. Several existing workflows and composite actions were updated to improve shell script robustness by quoting variables and adding shell directives. Additionally, a deprecated deployment workflow to GCP was removed.

Changes

File(s) Change Summary
.github/workflows/github-actions-lint.yml Added a workflow to lint GitHub Actions workflows and actions on PRs affecting relevant directories.
.github/actions/console-web-ui-testing/action.yml Added explicit shell: bash to the step retrieving the UI Tests token.
.github/workflows/create-pre-release-pr.yml Quoted shell variable expansions and improved file content reading with jq for robustness.
.github/workflows/reusable-build-image.yml Quoted environment variables and inputs in shell script steps; added shellcheck directive to suppress warnings.
.github/workflows/reusable-create-github-release.yml Quoted shell variables and output redirections for safer shell usage.
.github/workflows/reusable-deploy-k8s.yml Quoted variables in helm deployment commands and added shellcheck directive for conditional arguments.
.github/workflows/console-web-deploy-to-gcp.yml (deleted) Removed the workflow that deployed the console web application to GCP based on tags, including validation, deployment, and summary.

Poem

In the warren of workflows, a new check appears,
Linting our actions, dispelling our fears.
On each pull request, it hops in to see—
Are our YAMLs neat as they ought to be?
With actionlint’s wisdom and bunny delight,
Our CI hops forward, all tidy and right!
🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between e8bf562 and 0d568d5.

📒 Files selected for processing (7)
  • .github/actions/console-web-ui-testing/action.yml (1 hunks)
  • .github/workflows/console-web-deploy-to-gcp.yml (0 hunks)
  • .github/workflows/create-pre-release-pr.yml (5 hunks)
  • .github/workflows/github-actions-lint.yml (1 hunks)
  • .github/workflows/reusable-build-image.yml (1 hunks)
  • .github/workflows/reusable-create-github-release.yml (2 hunks)
  • .github/workflows/reusable-deploy-k8s.yml (2 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/console-web-deploy-to-gcp.yml
✅ Files skipped from review due to trivial changes (5)
  • .github/actions/console-web-ui-testing/action.yml
  • .github/workflows/reusable-create-github-release.yml
  • .github/workflows/reusable-deploy-k8s.yml
  • .github/workflows/create-pre-release-pr.yml
  • .github/workflows/reusable-build-image.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/github-actions-lint.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@stalniy stalniy force-pushed the chore/actionlint branch 2 times, most recently from e1db8a4 to e8bf562 Compare May 16, 2025 08:38
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/github-actions-lint.yml (2)

10-13: Enforce least-privilege permissions
By default, GITHUB_TOKEN has broad scopes. Since this job only needs to read workflow files, restrict it with a permissions block, for example:

 jobs:
   lint:
+    permissions:
+      contents: read
+      actions: none
     runs-on: ubuntu-latest

14-15: Verify pinned action versions
You’ve pinned actions/checkout@v4 and raven-actions/actionlint@v2 by major version. For greater stability, consider pinning to a specific patch release (e.g., actions/checkout@v4.10.0) or a commit SHA.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c5c5ab5 and e8bf562.

📒 Files selected for processing (1)
  • .github/workflows/github-actions-lint.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/github-actions-lint.yml (2)

1-2: Workflow name is descriptive
GitHub Actions Linting clearly conveys its purpose and intent.


16-21: actionlint configuration looks solid
Locking version: 1.7.7 and supplying targeted ignore flags matches the project’s needs. Just ensure the regex patterns behave as expected—testing them locally can help confirm no unintended warnings slip through.

@stalniy stalniy force-pushed the chore/actionlint branch 3 times, most recently from 1d560fa to 816c3f7 Compare May 16, 2025 09:00
ygrishajev
ygrishajev previously approved these changes May 16, 2025
@stalniy stalniy merged commit b31df20 into main May 16, 2025
29 checks passed
@stalniy stalniy deleted the chore/actionlint branch May 16, 2025 09:51
stalniy added a commit that referenced this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments