Just give it a percentage, say 50, and it will have a 50/50 chance of passing! Which means if you give it 0 or 10, it will fail all the time and most of the times respectively. π Pretty cool right?
GitHub repo
hedyhli / passibility
β Control the probability of this Github action from passing/failing!
How to use this
name: "Will I Pass..."
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: hedythedev/passibility@main
with:
percentage: 100
Example Workflow: This workflow will pass all the time!
Option Inputs
percentage
Percentage of passing - (without the %) 0, for always fail, 100 for always pass and so on.
Additional info
- This is my first GitHub action, and itβs written in JavaScript.
- Generated from the JavaScript Action Template
- Unit tests using Jest
- This isnβt a submission to the Actions Hackathon because Iβm not old enough (18+ only), but I made this to experiment with GitHub Actions
- Feel free to try it out and give me some feedback
- Contributions welcome - like having another input called fail_percentage so you can instead provide the fail probability? π€
- Remember to β star the project if you liked it ;)
Top comments (0)