DEV Community

Cover image for 10 Hidden Gems in GitHub Actions for Automating Your Workflow
Balraj Singh
Balraj Singh

Posted on

10 Hidden Gems in GitHub Actions for Automating Your Workflow

GitHub Actions has revolutionized how we automate workflows, especially in a DevOps-driven world. Sure, you’ve seen the basics: CI/CD pipelines, testing, and deployments. But there’s a world beyond the standard use cases—a treasure trove of hidden gems that can supercharge your workflow in ways you probably didn’t think of.

Let’s dive into 10 GitHub Actions that are underrated yet powerful.

1. YAML Validator

YAML files power most CI/CD workflows, but a single indentation error can wreak havoc. This Action validates your YAML files before you commit them, saving you from hours of debugging broken pipelines.

Use it for:

  • Ensuring proper syntax in your .github/workflows directory.
  • Avoiding misconfigurations in Kubernetes YAML files.

Example:
- name: Validate YAML
uses: ibiqlik/action-yaml-lint@v3
with:
config_file: '.yamllint'

2. Markdown Link Checker

Ever published documentation only to find broken links later? This Action automatically scans your Markdown files and flags dead links.

Use it for:

  • Keeping README files and documentation error-free.
  • Maintaining professionalism in open-source repositories.

Example:
- name: Check Markdown Links
uses: gaurav-nelson/github-action-markdown-link-check@v1

3. Auto Assign PRs

This Action automates assigning reviewers and team members to pull requests, cutting down the manual overhead of assigning tasks.

Use it for:

  • Ensuring code reviews are always assigned to the right people.
  • Enforcing a review policy in your team.

Example:

- name: Auto Assign PR
uses: kentaro-m/auto-assign-action@v1
with:
assignees: 'team-lead'
reviewers: 'senior-dev'

4. Commitlint

Clean commit messages lead to better collaboration. This Action checks your commit messages against a predefined convention (e.g., Angular, Conventional Commits).

Use it for:

  • Enforcing consistent commit messages in large teams.
  • Simplifying changelog generation and semantic versioning.

Example:
- name: Commitlint
uses: wagoid/commitlint-github-action@v5

5. Cache Dependencies

Caching dependencies can drastically speed up your CI runs. This Action allows you to reuse dependencies across builds, saving time and bandwidth.

Use it for:

  • Node.js, Python, or Ruby projects with heavy dependency installations.
  • Any project with large build artifacts.

Example:
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

6. Notify Slack

Get real-time updates in Slack about your workflow status. Whether it’s a build success or failure, keep your team in the loop without checking GitHub constantly.

Use it for:

  • Immediate alerts for deployment failures.
  • Keeping non-technical stakeholders informed.

Example:
- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
message: "Deployment Status: ${{ job.status }}"

7. License Compliance Checker

Avoid legal issues by ensuring all your project dependencies comply with your organization’s licensing policies.

Use it for:

  • Open-source projects that rely on external libraries.
  • Enterprise projects with strict licensing requirements.

Example:
- name: License Check
uses: anchorfree/license-check-action@v2

8. Pull Request Size Labeler

Automatically label pull requests based on their size (e.g., small, medium, large). This helps reviewers prioritize and allocate time accordingly.

Use it for:

  • Teams with high PR volumes.
  • Avoiding scope creep in feature branches.

Example:
- name: PR Size Labeler
uses: kentaro-m/size-label-action@v3

9. Security Scan with Trivy

Security should never be an afterthought. Trivy scans your container images and dependencies for vulnerabilities.

Use it for:

  • Ensuring your Docker images are production-ready.
  • Identifying outdated or vulnerable libraries.

Example:
- name: Security Scan
uses: aquasecurity/trivy-action@v0.3.0
with:
image-ref: myapp:latest

10. Auto Merge Dependabot Updates

Dependabot keeps your dependencies updated, but reviewing and merging every update manually can be tedious. This Action automatically merges updates that pass your CI tests.

Use it for:

  • Keeping dependencies secure and up-to-date without manual intervention.
  • Reducing maintenance overhead in active projects.

Example:
- name: Auto Merge Dependabot
uses: ahmadnassri/action-dependabot-auto-merge@v2

GitHub Actions is much more than a CI/CD tool—it’s a platform for building workflows that optimize productivity, ensure quality, and reduce bottlenecks.

Which of these Actions are you adding to your workflow? Or do you have a favorite that didn’t make the list? Let’s discuss below!

Top comments (2)

Collapse
 
savez profile image
saverio

Auto assignment of PR is already provided in GitHub usanod CODEOWNERS files docs.github.com/en/repositories/ma...

Collapse
 
danishhh profile image
Danish

Thanks for sharing this!