@putout/plugin-github
🐊Putout plugin helps with github actions
Last updated 8 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-github 
SYNC missed versions from official npm registry.

@putout/plugin-github NPM version

Automate, customize, and execute your software development workflows right in your repository with GitHub Actions.

(c) github.com

🐊Putout plugin helps with Github Actions.

Install

npm i @putout/plugin-github -D

Rules

Config

{
    "rules": {
        "github/add-continue-on-error-to-add-and-commit": "on",
        "github/add-continue-on-error-to-coveralls": "on",
        
        "github/add-madrun-init": "on",
        
        "github/convert-npm-to-bun": "on",
        "github/convert-typos-to-typos-ai": "on",
        
        "github/install-bun": "on",
        "github/install-rust": "on",
        
        "github/remove-empty-needs": "on",
        "github/set-contents-permissions": "on",
        
        "github/set-message-of-commit-fixes": "on",
        "github/set-node-versions": "on",
        
        "github/update-actions": "on"
    }
}

add-continue-on-error-to-coveralls

Add ability to continue when cannot submit coverage to Coveralls using continue-on-error.

  - name: Commit fixes
    continue-on-error: true
    uses: EndBug/add-and-commit@v10
    with:
      fetch: --force
      message: "chore: ${{ env.NAME }}: actions: lint ☘️"
      pull: --rebase --autostash
+   continue-on-error: true

add-continue-on-error-to-coveralls

Add ability to continue when cannot submit coverage to Coveralls using continue-on-error.

  - name: Coveralls
    uses: coverallsapp/github-action@v2
    with:
      github-token: ${{ secrets.GITHUB_TOKEN }}
+   continue-on-error: true

add-madrun-init

Checkout int 🐊Putout Editor.

Add madrun init:

  - name: Install redrun
-   run: bun i redrun -g
+   run: bun i redrun madrun -g
+ - name: Init madrun
+   run: madrun init

convert-npm-to-bun

  - name: Install Redrun
-   run: npm install redrun -g --no-save
+   run: bun install redrun -g --no-save
  - name: Install
-   run: npm i -f --no-save
+   run: bun i -f --no-save

convert-typos-to-typos-ai

Use typos.ai action, it is much simpler and also clever. Checkout in 🐊Putout Editor.

- - name: Install Rust
-   run: rustup update
- - uses: actions/cache@v5
-   with:
-     path: |
-       ~/.cargo/bin/
-       ~/.cargo/registry/index/
-       ~/.cargo/registry/cache/
-       ~/.cargo/git/db/
-       target/
-     key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- - name: Typos Install
-   run: which typos || cargo install typos-cli
  - name: Typos
-   run: typos --write-changes
+   uses: coderaiser/typos.ai@v1.1.8
+   with:
+     key: ${{ secrets.TYPOS_AI_KEY }}

install-bun

Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called bun.

At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.

(c) bun.sh.

Checkout in 🐊Putout Editor.

steps:
  - uses: actions/checkout@v3
  - name: Use Node.js ${{ matrix.node-version }}
    uses: actions/setup-node@v3
    with:
      node-version: ${{ matrix.node-version }}
+  - uses: oven-sh/setup-bun@v2
+    with:
+      bun-version: latest

install-bun

Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called bun.

At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.

(c) bun.sh.

Bun install works much faster: 40s before - 2s after.

Checkout in 🐊Putout Editor.

- name: Install Redrun
-    run: npm i redrun -g
+    run: bun i redrun -g --no-save
- name: Install
-    run: npm install
+    run: bun i --no-save

remove-empty-needs

Checkout in 🐊Putout Editor.

jobs:
  deploy-test:
    runs-on: ubuntu-latest
-   needs: []

install-rust

A language empowering everyone to build reliable and efficient software.

(c) Rust.

Checkout in 🐊Putout Editor.

steps:
  - uses: actions-rs/toolchain@v1
    with:
      toolchain: stable
+  - name: Install Rust
+    run: runstup update

set-contents-permissions

To use EndBug/and-end-commit you need to set content permissions.

Checkout int 🐊Putout Editor.

name: Node CI
+permissions:
+  contents: write

set-message-of-commit-fixes

Checkout in 🐊Putout Editor.

  uses: EndBug/add-and-commit@v9
         continue-on-error: true
         with:
-          message: chore(${{ env.NAME }}) lint using actions
+          message: "chore: ${{ env.NAME }}: actions: lint ☘️"

You can override message with:

{
    "rules": {
        "github/set-message-of-commit-fixes": ["on", {
            "message": "βœ… fixed with github actions"
        }]
    }
}

set-node-versions

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
-       node-version: [20.x, 22.x, 24.x]
+       node-version: [22.x, 24.x, 26.x, 27.x]

You can override versions with:

{
    "rules": {
        "github/set-node-versions": ["on", {
            "versions": [
                "16.x",
                "18.x",
                "20.x"
            ]
        }]
    }
}

update-actions

coverallsapp/github-action@master:

      - name: Coveralls
-       uses: coverallsapp/github-action@master
+       uses: coverallsapp/github-action@v2

docker/login-action:

      - name: Login to Docker Hub
-       uses: docker/login-action@v2
+       uses: docker/login-action@v4

docker/build-push:

      - name: Build and push alpine-image
-       uses: docker/build-push-action@v4
+       uses: docker/build-push-action@v7

docker/setup-buildx:

      - name: Set up Docker Buildx
-       uses: docker/setup-buildx-action@v2
+       uses: docker/setup-buildx-action@v4

actions/checkout:

  steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v7

actions/cache:

  steps:
-      - uses: actions/cache@v4
+      - uses: actions/checkout@v5

actions/setup-node:

  steps:
-      - uses: actions/setup-node@v2
+      - uses: actions/setup-node@v7

actions/upload-artifact:

  steps:
-      - uses: actions/uplod-artifact@v4
+      - uses: actions/upload-artifact@v7

docker/setup-quemu:

  steps:
        - name: Set up QEMU
-         uses: docker/setup-qemu-action@v2
+         uses: docker/setup-qemu-action@v4

EndBug/add-and-commit:

  steps:
-      uses: EndBug/add-and-commit@v7
+      uses: EndBug/add-and-commit@v9

oven-sh/setup-bun@v1:

  steps:
-      uses: oven-sh/setup-bun@v1
+      uses: oven-sh/setup-bun@v2

License

MIT

Current Tags

  • 21.2.1                                ...           latest (13 days ago)

78 Versions

  • 21.2.1                                ...           13 days ago
  • 21.2.0                                ...           15 days ago
  • 21.1.0                                ...           15 days ago
  • 21.0.1                                ...           a month ago
  • 21.0.0                                ...           a month ago
  • 20.9.0                                ...           2 months ago
  • 20.8.0                                ...           3 months ago
  • 20.7.0                                ...           4 months ago
  • 20.6.2                                ...           4 months ago
  • 20.6.1                                ...           4 months ago
  • 20.6.0                                ...           4 months ago
  • 20.5.1                                ...           4 months ago
  • 20.5.0                                ...           5 months ago
  • 20.4.1                                ...           5 months ago
  • 20.4.0                                ...           5 months ago
  • 20.3.2                                ...           6 months ago
  • 20.3.1                                ...           6 months ago
  • 20.3.0                                ...           6 months ago
  • 20.2.1                                ...           6 months ago
  • 20.2.0                                ...           6 months ago
  • 20.1.0                                ...           7 months ago
  • 20.0.0                                ...           7 months ago
  • 19.2.0                                ...           8 months ago
  • 19.1.0                                ...           8 months ago
  • 19.0.0                                ...           8 months ago
  • 18.1.0                                ...           10 months ago
  • 18.0.1                                ...           a year ago
  • 18.0.0                                ...           a year ago
  • 17.2.0                                ...           a year ago
  • 17.1.0                                ...           a year ago
  • 17.0.0                                ...           a year ago
  • 16.1.0                                ...           a year ago
  • 16.0.0                                ...           2 years ago
  • 15.0.0                                ...           2 years ago
  • 14.0.0                                ...           2 years ago
  • 13.0.0                                ...           2 years ago
  • 12.3.0                                ...           3 years ago
  • 12.2.0                                ...           3 years ago
  • 12.1.1                                ...           3 years ago
  • 12.1.0                                ...           3 years ago
  • 12.0.2                                ...           3 years ago
  • 12.0.1                                ...           3 years ago
  • 12.0.0                                ...           3 years ago
  • 11.0.0                                ...           3 years ago
  • 10.0.0                                ...           3 years ago
  • 9.1.0                                ...           3 years ago
  • 9.0.0                                ...           3 years ago
  • 8.2.0                                ...           3 years ago
  • 8.1.0                                ...           3 years ago
  • 8.0.4                                ...           3 years ago
  • 8.0.3                                ...           3 years ago
  • 8.0.2                                ...           3 years ago
  • 8.0.1                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 7.6.0                                ...           3 years ago
  • 7.5.0                                ...           3 years ago
  • 7.4.0                                ...           3 years ago
  • 7.3.0                                ...           3 years ago
  • 7.2.0                                ...           3 years ago
  • 7.1.0                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 6.0.1                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 5.1.0                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 4.4.0                                ...           4 years ago
  • 4.3.0                                ...           4 years ago
  • 4.2.0                                ...           4 years ago
  • 4.1.0                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (9)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE