This repository contains a collection of reusable GitHub Actions designed to automate various tasks. These actions can be integrated into your workflows to streamline processes related to Python, Node.js, and version control.
- Description: This action detects direct pushes to the
mainbranch and checks whether the push is a pull request merge or a direct commit. It ensures that only pull request merges are allowed tomain, preventing direct pushes.
- Description: This action ensures that the
VERSIONandCHANGELOG.mdfiles are updated in pull requests. It checks if these files are modified when a pull request is opened or synchronized, enforcing best practices for versioning and changelog management.
These actions help with automating Python-related tasks such as linting, testing and dependency installation.
- Linting: Runs
flake8on Python code to enforce coding standards. - Run Tests: Executes unit tests using
pytest. - Install Dependencies: Installs project dependencies from the
requirements.txtfile.
These actions help automate tasks related to Node.js projects, including dependency installation, testing, and building the app.
- Install Dependencies: Installs project dependencies using
npm cifor faster, deterministic installations in CI environments. - Run Tests: Executes tests using
npm test. - Build App: Builds the app by installing dependencies and running the build command.
To use any of these actions in your own workflows, reference them in your .github/workflows directory.
For example, to use the Detect Direct Push to Main action in your workflow:
name: Detect Direct Push to Main
on:
push:
branches:
- main
jobs:
detect-direct-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Detect Direct Push
uses: your-org/your-repo/actions/version-control/detect-direct-push@main