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: 14 days 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T05:08:14.000Z (over 3 years ago)
- Last Synced: 2025-03-26T10:03:41.949Z (20 days 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: 37
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Memer Action - A GitHub Action for Programmer Memes xD. (Community Resources / Utility)
- fucking-awesome-actions - Memer Action - A GitHub Action for Programmer Memes xD. (Community Resources / Utility)
- awesome-workflows - Memer Action - A GitHub Action for Programmer Memes xD. (Community Resources / Utility)
README
Memer Action
[](https://github.com/marketplace/actions/memer-action)
[](https://github.com/Bhupesh-V/memer-action/releases)
[](https://github.com/Bhupesh-V/memer-action/actions?query=workflow%3ALint)
[](https://github.com/Bhupesh-V/memer-action/actions?query=workflow%3A%22Integration+Test%22)
![]()
## β¨ Demo

## β 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 }}**

βΉοΈ 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 [](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.