Action to Mermaid

Overview

Action to Mermaid

▢️ to πŸ§œβ€β™€οΈ

About

Now that GitHub renders Mermaid diagrams, here is a GitHub action that generates a Mermaid diagram out of an action's metadata file.

Overview

flowchart LR
input1(nwo):::optional-->action(Action to Mermaid):::action
input2(token):::optional-->action(Action to Mermaid):::action
action(Action to Mermaid)-->output1(mermaid):::output
classDef required fill:#6ba06a,stroke:#333,stroke-width:3px
classDef optional fill:#d9b430,stroke:#333,stroke-width:3px
classDef action fill:blue,stroke:#333,stroke-width:3px,color:#ffffff
classDef output fill:#fff,stroke:#333,stroke-width:3px,color:#333

Example usage

name: Mermaid

on:
  # Upon push to action.yml in the main branch
  push:  
    branches: [ main ]
    paths:
      - action.yml
  # Or upon manual trigger
  workflow_dispatch:

jobs:
  mermaid:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      # Get Mermaid diagram for the action repository this workflow runs in
      # Use `nwo` option to change the action repository
      - name: Get Mermaid diagram
        id: mermaid
        uses: imjohnbo/action-to-mermaid@v0

      # Do something with Mermaid diagram, e.g. update README, output to separate file, etc.
      - name: Echo Mermaid diagram
        env:
          MERMAID: ${{ steps.mermaid.outputs.mermaid }}
        run: |-
          echo "$MERMAID"

Example output

```mermaid
flowchart LR
input1(nwo):::optional-->action(Action to Mermaid):::action
input2(token):::optional-->action(Action to Mermaid):::action
action(Action to Mermaid)-->output1(mermaid):::output
classDef required fill:#6ba06a,stroke:#333,stroke-width:3px
classDef optional fill:#d9b430,stroke:#333,stroke-width:3px
classDef action fill:blue,stroke:#333,stroke-width:3px,color:#ffffff
classDef output fill:#fff,stroke:#333,stroke-width:3px,color:#333
```

License

MIT

Contributing

Pull requests are welcome!

You might also like...

GitHub action code for VMware Image Builder (VIB).

VMware Image Builder Overview This GitHub Action allows to interact with the VMware Image Builder service from VMware, a.k.a. VIB. VIB is a SaaS servi

Dec 22, 2022

βš™οΈ A GitHub Action to push a feed item to RSS3 network

RSS3 Github Action Update a users feed to reflect changes in a Github Repository. Setup Have a copy of your private key Add an environment secret to y

Apr 26, 2022

GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (istanbul)

GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (istanbul)

GitHub Action: Report NYC coverage GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (ista

Nov 23, 2022

πŸš€ A GitHub action to publish a new release of the repository

Create a JavaScript Action using TypeScript Use this template to bootstrap the creation of a TypeScript action. πŸš€ This template includes compilation

Nov 1, 2022

πŸ’…β€A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, Prettier, GitHub Action releases and more.

πŸ’…β€A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, Prettier, GitHub Action releases and more.

Electron App πŸ’…  A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, P

Dec 29, 2022

An action intended to run on pull request and post a comment summarizing any changes to DevCycle variables.

An action intended to run on pull request and post a comment summarizing any changes to DevCycle variables.

Overview With this Github action, information on which DevCycle features have been added or removed in a code change will be shown directly on each Pu

Jun 14, 2022

Harassment Manager is a web application that aims to empower users to document and take action on abuse targeted at them on online platforms.

Harassment Manager Online abuse and harassment silence important voices in conversation, forcing already marginalized people offline. Harassment Manag

Dec 6, 2022

Alexa Skill & Google Action code that works on AWS Lambda

Alexa Skill & Google Action code that works on AWS Lambda

Jovo v4 Sample: Alexa Skill & Google Action on AWS Lambda Website - Docs - Marketplace - Template This Jovo v4 sample app showcases the following feat

Nov 22, 2022

This GitHub Action will setup a Nushell environment for you.

setup-nu δΈ­ζ–‡θ―΄ζ˜Ž This GitHub Action will setup a Nushell environment for you. Usage Examples In most cases you need to specify the version of Nushell to

Dec 30, 2022
Releases(v1.1.0)
Owner
John Bohannon
Engineering @GitHub
John Bohannon
A github action that provides detailed bundle analysis on PRs for next.js apps

Next.js Bundle Analysis Github Action Analyzes each PR's impact on your next.js app's bundle size and displays it using a comment. Optionally supports

HashiCorp 369 Dec 27, 2022
A custom action for setting GitHub Workflow environment variables with YAML configuration files.

yaml-env-action - A custom action for setting GitHub Workflow environment variables with YAML configuration files. Introduction yaml-env-action is a c

Piper Dougherty 3 Dec 13, 2022
Setup-graalvm - GitHub Action for setting up GraalVM CE.

GitHub Action for GraalVM This GitHub action sets up GraalVM Community Edition and GraalVM components such as Native Image and GraalVM languages. Key

GraalVM 105 Jan 2, 2023
Inspiration for revealing content by morphing the action element.

Morphing Buttons Concept Inspiration for revealing content by morphing the action element. Article on Codrops Demo Integrate or build upon it for free

Codrops 591 Aug 18, 2022
A GitHub Action for pushing to a repo.

action-gh-push A GitHub Action for pushing to a repo. ?? Usage Below is a simple example of step.if tag gating name: ci on: push jobs: build:

θΏ·ζΈ‘ 6 Feb 15, 2022
πŸ€–β€An action that fetches the list of malicious domains on Discord in different providers and creates/updates a JSON file with them from time to time.

Discord Guardian Action ??  This action fetches the list of malicious domains on Discord in different providers and creates/updates a JSON file with t

Dalton Menezes 7 Nov 30, 2022
A GitHub Action to cache your workload to a Google Cloud Storage bucket.

Google Cloud Storage Cache Action GitHub already provides an awesome action to cache your workload to Azure's servers hosted in United States. However

MansaGroup 9 Dec 15, 2022
πŸ€– GitHub Action which creates Issues from comments in your code

todo-issue[action] Disclosure Huge thanks to JasonEtco! After he decided to shut down his todo[bot] I've looked around for alternatives but decided to

Julian 17 Dec 11, 2022
GitHub action to install Foundry

foundry-toolchain Action This GitHub action installs Foundry. Example workflow on: [push] name: test jobs: check: name: Foundry project ru

Bjerg 128 Jan 5, 2023
Github action to parse OWNERS files and outputs random reviewers

Get Owners Github Action Do you want to have all the approvers and reviewers without having strange scripts in your actions? Do you want to have rando

Ugo Palatucci 3 Oct 22, 2022