npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-actions

v0.9.0

Published

CLI tool to install and update GitHub Actions

Downloads

5,130

Readme

GitHub Actions Manager

npm Codecov npm type definitions

-- Who will test our unit tests?

-- I have no idea 🤨

-- Okay, who will automate our automation?

-- GitHub Actions Manager 😎

Kickstart automation in one command. Clone, update and share GitHub Actions workflows and best practices.

Comes with awesome packs for Node.js, Python, Go, Terraform, Julia, and Rust projects.

Basic usage

# install globally or locally
npm i -g github-actions
# npm i --save-dev github-actions

# run interactive manager
# in a GitHub repository root
ghactions

# or check how to run non-interactively
ghactions --help

Automated automation?

Yes, why not! Even small projects nowadays have at least simple CI/CD to enforce best practices or just to avoid boring release management. Thanks to GitHub Actions, it is super easy to kickstart an automation for a new project in minutes.

However, every project CI/CD has to be set up and updated separately, even though they have a lot in common. So, instead of making our life easier, CI/CD adds a new folder in a project to keep an eye on.

But imagine, what if we could...

  • manage our GitHub Actions the same way we manage npm dependencies
  • adapt CI/CD for different projects to our needs and still keep them in sync
  • share the best CI/CD practices and collaborate to raise the bar even higher

And finally, what if we could add these best practices for a new project with a single command.

Let's start today

  • CI/CD for Node.js projects installation guide
  • CI/CD for Python projects installation guide
  • CI/CD for Rust projects by @actions-rs
  • CI/CD for Go projects by @mvdan
  • CI/CD for Julia projects by @julia-actions
  • CI/CD for Terraform projects by @dflook
  • Or provide path to any GitHub repository to clone their workflows (run ghactions, then select From GitHub URL)
  • Or even clone workflows from your local path (run ghactions, then select From directory)

Advanced usage

Simple, no-force update

  • jobs.* are added fom remote
  • jobs.*.steps that are github-actions-managed are updated from remote or removed if they do not exist remotely
  • jobs.*.steps that are not github-actions-managed are kept untouched and preserve their position in workflow
  • jobs.*.steps that exist only remotely are added to workflow to correct position, so to remove step, make in not managed and run empty run command to it, keep id the same.

Force update

  • Top comment in YAML file is replaced with remote
  • jobs.* are deleted if they do not exist remotely
  • name workflow name is replaced with remote
  • on triggers are replaced with remote
  • jobs.*.env is replaced with remote
  • jobs.*.strategy is replaced with remote
  • jobs.*.runs-on is replaced with remote
  • jobs.*.if is replaced with remote

CLI arguments

| Short | Long | Default | Description | | - | - | - | - | | -n <name>[ <name>]* | --names <name>[ <name>]* | interactive mode | Workflow name <name>.yml, all, or installed | | -i <url> | --index <url> | <GitHub URL> / file:///url / node / python | Link to workflows directory .../.github/workflows | | -r <version> | --ref <version> | | Update workflows to a specific tag/branch | | -p <path> | --path <path> | current workdir | Path to GitHub project root | | -u | --update | | Apply suggested changes | | -f | --force | | Update user-managed workflow parts | | -l | --list | | List available workflows | | -d | --diff | | Show diff for update and check runs | | -c | --clean | | Do not add github-actions-managed marker to workflow steps | | -h | --help | | Print this usage guide | | -v | --version | | Show package version |

Version 1.0.0 checklist

  • [x] Unify check and update reports
  • [x] Support user top comment in workflows
  • [x] Add custom indexes support
  • [x] Add --list argument to list workflows in index
  • [x] Add --path argument to allow running not for a repository root
  • [x] Smart diff
  • [x] Interactive CLI
  • [x] Generator for index READMEs
  • [x] Add --clean CLI flag to remove github-actions-managed flags
  • [ ] Interactive updates selection

Versioning

github-actions adheres to Semantic Versioning.

Latest changes

Full changelog can be found in Changelog. Release notes can be found in Releases.