This repository is meant for testing different GitHub Actions workflows. I feature these examples on my YouTube channel and on my blog.
I aim to create practical examples for people who are just getting started with GitHub Actions and are in need of some inspiration.
If you have a cool workflow in mind then feel free to open a pull request and I might even do a video about it!
Here are the workflows that are currently configured.
The pull request labeler workflow in .github/workflows/pr-labels.yml assigns labels to pull requests based on the edited file types and directories.
When someone opens a pull request or a new issue for the first time in this repository they are greeted by the first interaction action located in .github/workflows/first-interaction.yml.
If there are issues that are have not been resolved and have been open for a long time they will be marked as stale and eventually closed automatically. The workflow is located in .github/workflows/stale.yml.
Pull requests are checked with the Black code formatter to verify that all committed Python code is formatted properly. The workflow can be found from .github/workflows/black.yml.
Flake8 is a Python linter. The .github/workflows/flake8.yml workflow verifies that all pull requests pass the check.
The repository contains a super simple Python unit test that always passes. The .github/workflows/unittest.yml is the workwflow that runs that check against all push events.
When someone comments a pull request or an issue with "I like pizza", the workflow in .github/workflows/like-pizza.yml will react to the comment with a thumbs up emoji. This demonstrates how you can use the issue_comment
event.
The deployment workflow takes issue comments one step further. In addition to reacting with the rocket emoji to a "/deploy" comment in a PR, it will checkout the correct branch, run a fake deployment command that might fail, and then respond back to the PR with a message that tells the deployment status.
- Have an idea for a cool workflow
- Fork the repository
- Implement and test your workflow
- Describe it shortly in the README
- Open a pull request