Git Product home page Git Product logo

chuck-norris-quote's Introduction

Chuck Norris quote action

A github action to output a random chuck norris quote within a wokflow. Supports text or html output.

For example:

Chuck Norris's keyboard doesn't have a Ctrl key because nothing controls Chuck Norris.

This is a very simple, lighthearted addition to your workflow. It is very quick, and using the default options, outputs a Chuck Norris quote to yourr workflow logs. You can optionally capture the tag as an action output and place that quote anywhere you like such as within a readme, as part of creating an issue, anything you like.

Note: Quotes of an explicit nature have been specifically excluded as part of the quote generation and there is currently no support to enable this.

Usage

Inputs

  • quote-format: html/text. Default is text
    • Format to return the quote in.
  • escape-quote : true/false. Default is false.
    • Deterrmines whether the quote should be escaped which just means it will escape the single quote character which can cause problems when outputting the text quote in some scenarios such as using in echo statements"

A sample workflow to output a quote to the logs

name: Chuck Norris test workflow

on:
  workflow_dispatch:

jobs:
  action:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - name: chuck-norris-quote-action
        uses: glav/[email protected]

A sample workflow to specify Html output and use it in a subsequent step

name: Chuck Norris test workflow Html

on:
  workflow_dispatch:

jobs:
  action:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - name: chuck-norris-quote-action-html
        id: htmlchuck
        uses: glav/[email protected]
        with:
          quote-format: 'html'
          escape-quote: 'true'

      - name: ShowHtmlOutput
        run: echo "${{ steps.htmlchuck.outputs.quote }}"

Developers

Building this action

If you want to fork and make modifications to this action, simply edit the associated JS files to suit. Then to build, you will need to install NCC and build the main.js file into the dist/index.js folder/file. This will build a single JS file and include any dependencies, thuis removing the need to include the node_modules folder as part of your action.

Install ncc globally

npm install -g @zeit/ncc

Using ncc

When you use ncc:

ncc build .\main.js -o . -m

or

build.cmd

This creates the /index.js file which includes all the necessary dependencies aggregated into one file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.