Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhupesh-v/memer-action
A GitHub Action for Programmer Memes xD
https://github.com/bhupesh-v/memer-action
actions dank-memer dankmemes fun hacktoberfest meme memer memer-action memes memes4life programmerhumor project-management pull-requests reddit utilities workflows
Last synced: about 2 months ago
JSON representation
A GitHub Action for Programmer Memes xD
- Host: GitHub
- URL: https://github.com/bhupesh-v/memer-action
- Owner: Bhupesh-V
- License: mit
- Created: 2020-04-10T08:50:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T05:08:14.000Z (about 3 years ago)
- Last Synced: 2024-10-27T03:01:49.745Z (about 2 months ago)
- Topics: actions, dank-memer, dankmemes, fun, hacktoberfest, meme, memer, memer-action, memes, memes4life, programmerhumor, project-management, pull-requests, reddit, utilities, workflows
- Language: Python
- Homepage: https://bhupesh.me/memer-action-github-action-for-programmer-memes/
- Size: 104 KB
- Stars: 36
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Memer Action
[![Github marketplace](https://img.shields.io/badge/Marketplace-Memer%20Action-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/memer-action)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/bhupesh-v/memer-action?logo=GitHub)](https://github.com/Bhupesh-V/memer-action/releases)
[![Lint](https://github.com/Bhupesh-V/memer-action/workflows/Lint/badge.svg?branch=master)](https://github.com/Bhupesh-V/memer-action/actions?query=workflow%3ALint)
[![Integration Test](https://github.com/Bhupesh-V/memer-action/workflows/Integration%20Test/badge.svg?branch=master)](https://github.com/Bhupesh-V/memer-action/actions?query=workflow%3A%22Integration+Test%22)
## β¨ Demo
![demomemer](https://user-images.githubusercontent.com/34342551/79064573-a6fa9e80-7cc7-11ea-895e-6538c2b8548b.png)
## β Usage
### Example workflow
- You can use the following workflow as it is, just copy/paste in a file named `greetings.yml` inside your [workflows](https://github.com/Bhupesh-V/memer-action/tree/master/.github/workflows) folder.
- The reply action is performed by [create-or-update-comment](https://github.com/peter-evans/create-or-update-comment)```yaml
name: Memer Workflowon: [pull_request]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Memer Action
id: memeruses: 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/[email protected]
id: couc
with:
issue-number: ${{ github.event.number }}
body: |
ππ Thanks for opening this PR/Issue π€
Please wait while the maintainer(s) review itMeanwhile have a look at this π :
> **${{ steps.memer.outputs.title }}**
![meme](${{ steps.memer.outputs.meme }})
βΉοΈ Source [ Powered By π₯ Memer Action ]```
### Inputs
Memer Action accepts following input variables.
- `filter` (optional) : Sort Memes posts from reddit. Only 4 values are acceptable, **hot**, **top**, **new** & **rising**. By default the memes are "hot".
- `fallback` (optional) : A JSON string for showing a Fallback meme, in case there are no memes available. By default the fallback output is
```python
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",
}
``````yaml
steps:
- uses: actions/checkout@master
- name: Run action
id: myactionuses: Bhupesh-V/memer-action@master
with:
filter: new
fallback: '{"meme_link":"", "title": "", "src": ""}'- 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.
- `title`: The title of the post on reddit
- `meme`: The meme image link
- `source`: The Source of the Meme (post on reddit)```yaml
steps:
- uses: actions/checkout@master
- name: Run action
id: myactionuses: 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](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#restrictions-on-forked-repositories) for further explanation.## π Credits
- [create-or-update-comment](https://github.com/peter-evans/create-or-update-comment)
- [python-container-action](https://github.com/jacobtomlinson/python-container-action)## βΊοΈ Show your support
Support me by giving a βοΈ if this project helped you! or just [![Twitter URL](https://img.shields.io/twitter/url?label=Tweet%20Memer%20Action&logoColor=blue&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Furl%3Dhttps%3A%2F%2Fgithub.com%2FBhupesh-V%2Fmemer-action%26text%3DA%2520GitHub%2520Action%2520for%2520programmer%2520memes%2520%3B%29)](https://twitter.com/intent/tweet?url=https://github.com/Bhupesh-V/memer-action&text=A%20GitHub%20Action%20for%20programmer%20memes)
## π License
Copyright Β© 2020 [Bhupesh Varshney](https://github.com/Bhupesh-V).
This project is [MIT](https://github.com/Bhupesh-V/memer-action/blob/master/LICENSE) licensed.