DEV Community

Cover image for 10 Hidden Gems in GitHub Actions for Automating Your Workflow
Aditya Trivedi
Aditya Trivedi

Posted on

10 Hidden Gems in GitHub Actions for Automating Your Workflow

Here are 10 lesser-known but insanely useful GitHub Actions you should be using.

YAML Validator

- name: Validate YAML
  uses: ibiqlik/action-yaml-lint@v3
  with:
    config_file: '.yamllint'
Enter fullscreen mode Exit fullscreen mode
  • Saves you from debugging night-mare inducing YAML misconfigurations

  • Essential for Kubernetes, GitHub Workflows and CI/CD.


Markdown Link Checker

- name: Check Markdown Links
  uses: gaurav-nelson/github-action-markdown-link-check@v1
Enter fullscreen mode Exit fullscreen mode
  • Keep documentation flawless.

Auto Assign PRs

- name: Auto Assign PR
  uses: kentaro-m/auto-assign-action@v1
  with:
    assignees: 'team-lead'
    reviewers: 'senior-dev'
Enter fullscreen mode Exit fullscreen mode
  • Save time, specially for those teams who handle multiple PRs daily.

Commitlint

- name: Commitlint
  uses: wagoid/commitlint-github-action@v5
Enter fullscreen mode Exit fullscreen mode
  • Keeping changelogs neat and versioning structured.

Cache Dependencies

- name: Cache Node Modules
  uses: actions/cache@v3
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
    restore-keys: |
      ${{ runner.os }}-node-
Enter fullscreen mode Exit fullscreen mode
  • Reducing build times in active development environments

Notify Slack

- name: Notify Slack
  uses: rtCamp/action-slack-notify@v2
  with:
    webhook-url: ${{ secrets.SLACK_WEBHOOK }}
    message: "Deployment Status: ${{ job.status }}"
Enter fullscreen mode Exit fullscreen mode
  • Keeping teams updated instantly with real-time slack notifications for builds, tests, and deployments.

License Compilance Checker

- name: License Check
  uses: anchorfree/license-check-action@v2
Enter fullscreen mode Exit fullscreen mode
  • If your project depends on external libraries, you need to ensure all licenses are compilant. This action does the checking for you.

Notify Slack

- name: PR Size Labeler
  uses: kentaro-m/size-label-action@v3
Enter fullscreen mode Exit fullscreen mode
  • Helps reviewers by labelling PRs based on size - small, medium, large.

Security Scan with Trivy

- name: Security Scan
  uses: aquasecurity/trivy-action@v0.3.0
  with:
    image-ref: myapp:latest
Enter fullscreen mode Exit fullscreen mode
  • Keeping your Docker images secure.

  • Identifying vulnerable dependencies before deployment.


GitHub Actions for JIRA Integration

- name: Update Jira Issue
  uses: atlassian/gajira-create@v3
  with:
    project: "ENG"
    issuetype: "Task"
    summary: "Automated issue update from GitHub Action"
    description: "Linked PR: ${{ github.event.pull_request.html_url }}"
Enter fullscreen mode Exit fullscreen mode
  • This action automatically updates tickets based on GitHub commits and PR.

Do let me know which one will you use ?

Top comments (0)