Home

Awesome

<p align="center"> <h1 align="center">Memer Action</h1> <p align="center"> <a href=""><img src="https://raw.githubusercontent.com/Bhupesh-V/memer-action/master/images/header.png?token=AIGANF6ODRJK3Z2FQ5BKO6K6TLD2O" alt="memer-action-logo" height="160"></a> </p> </p>

Github marketplace GitHub release (latest by date) Lint Integration Test <a href="https://twitter.com/bhupeshimself"> <img alt="Twitter: Bhupesh Varshney" src="https://img.shields.io/twitter/follow/bhupeshimself.svg?style=social" target="_blank" /> </a>

✨ Demo

demomemer

❓ Usage

Example workflow

name: Memer Workflow

on: [pull_request]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Memer Action
        id: memer

        uses: Bhupesh-V/memer-action@master
        with:
          filter: "new"

      - name: Check Outputs
        run: |
          echo "${{ steps.memer.outputs.meme }}"
          echo "${{ steps.memer.outputs.title }}"
          echo "${{ steps.memer.outputs.source }}"

      - name: Create comment
        uses: peter-evans/create-or-update-comment@v1.3.0
        id: couc
        with:
          issue-number: ${{ github.event.number }}
          body: |
            πŸŽ‰πŸŽ‰ Thanks for opening this PR/Issue πŸ€—
            Please wait while the maintainer(s) review it

            Meanwhile have a look at this 😝 :

            > **${{ steps.memer.outputs.title }}**
            ![meme](${{ steps.memer.outputs.meme }})
            <sub>ℹ️ <a href="${{ steps.memer.outputs.source }}">Source</a> [ Powered By πŸ”₯ <a href="https://github.com/Bhupesh-V/memer-action">Memer Action</a> ]</sub>

Inputs

Memer Action accepts following input variables.

FALLBACK = {
    "meme_link": "https://raw.githubusercontent.com/Bhupesh-V/memer-action/master/images/header.png",
    "title": "Oops :( looks like we are out of memes.",
    "src": "https://github.com/Bhupesh-V/memer-action",
}
steps:
- uses: actions/checkout@master
- name: Run action
  id: myaction

  uses: Bhupesh-V/memer-action@master
  with:
    filter: new
    fallback: '{"meme_link":"<meme-url>", "title": "<meme-title>", "src": "<meme-source-url>"}'

- name: Check outputs
    run: |
    echo "Outputs - ${{ steps.myaction.outputs.title }}"
    echo "Outputs - ${{ steps.myaction.outputs.meme }}"
    echo "Outputs - ${{ steps.myaction.outputs.source }}"

Outputs

Memer Action sets 3 outputs.

steps:
- uses: actions/checkout@master
- name: Run action
  id: myaction

  uses: Bhupesh-V/memer-action@master

- name: Check outputs
    run: |
    echo "Outputs - ${{ steps.myaction.outputs.title }}"
    echo "Outputs - ${{ steps.myaction.outputs.meme }}"
    echo "Outputs - ${{ steps.myaction.outputs.source }}"

Note: This action does not work in pull_request workflows when triggered by a fork opening a pull request in the upstream repository. This is due to restrictions put in place by GitHub Actions. See here for further explanation.

πŸ’™ Credits

☺️ Show your support

Support me by giving a ⭐️ if this project helped you! or just Twitter URL

πŸ“ License

Copyright Β© 2020 Bhupesh Varshney.<br /> This project is MIT licensed.