Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anuraghazra/code-runner-action
Github action to run javascript code snippets from issues.
https://github.com/anuraghazra/code-runner-action
actions githubactions githubhackathon utility
Last synced: 10 days ago
JSON representation
Github action to run javascript code snippets from issues.
- Host: GitHub
- URL: https://github.com/anuraghazra/code-runner-action
- Owner: anuraghazra
- License: mit
- Created: 2020-03-09T07:16:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-28T13:12:59.000Z (about 2 years ago)
- Last Synced: 2024-05-01T20:56:26.942Z (6 months ago)
- Topics: actions, githubactions, githubhackathon, utility
- Language: JavaScript
- Size: 246 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Code Runner Action
Github action to run code snippets from issues.
This action extracts code from Github Issue's markdown blocks and execute it.* [Usage](#usage)
* [License](#license)## Usage
To use this action in your project, please follow the [instructions on GitHub](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow) for initiating a workflows folder structure in your repository, if you have not done so already.
Once you have your workflow structure set up, you can create a new workflow YAML file inside `/.github/workflows/` that contains the following:
```
on:
issues:
types: [opened, edited]jobs:
code_runner_job:
runs-on: ubuntu-latest
name: Code Runner
steps:
- name: Run Code
uses: anuraghazra/code-runner-action@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
```Now when you `opened`, `edited` any issues this action will run and post a comment with the output of your executed codeblock.
## License
This project is under the [MIT License](LICENSE.txt)