useful-actions
This repository lists some useful generic Actions to use in your Github workflows and repositories.
Summary
π‘ Good To Know
- Usage Limits
- Workflow syntax for GitHub Actions
- Authentication in a workflow
- Creating a personal access token
π Useful Actions
οΏ½? Global Actions
Action Cond: GitHub Action to use a if-else operation when needed, to set dynamic configuration of other steps.
Add Label: GitHub Action to add GitHub labels to an issue or a pull request.
Add Reviewers: Github action that adds Reviewers to the Pull Request.
App Token: Github Action to impersonate a GitHub App when secrets.GITHUB_TOKEN's limitations are too restrictive and a personal access token is not suitable.
Assert command line output: Github Action to assert / check a command line output.
Auto Approve: Github Action to automatically approve pull requests.
Auto Assign: Github Action to add reviewers and assignees to a pull request when opened (needs auto_assign.yml configuration file).
Auto Assign Author: Github Action to automatically assigns PR author as an assignee.
Auto Merge: GitHub action to automatically merge pull requests when they are ready (automerged label).
Branch Names: Github Action to get branch or tag information without the /ref/* prefix.
Cache: Github Action to cache dependencies and build outputs to improve workflow execution time.
Cancel Workflow: Github Action cancel any previous runs that are not completed for a given workflow. This includes runs with a status of queued or in_progress.
Checkout: Github Action to checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
Close Pull Request: Github Action to automatically close a pull request (for example if modifying untouchable files).
Commit And Push: Github Action to commit and push new code to the repository.
Compress Images: Github Action to automatically compresses JPEGs, PNGs and WebPs in Pull Requests.
Create Pull Request: GitHub action to create a pull request for changes to your repository in the actions workspace.
Debug: GitHub action to print the environment variables and the event payload. Useful for developing or debugging GitHub Actions.
Env Vars: GitHub action to expose useful environment variables.
File Existence: Github Action to check if files exists or not.
First Interaction: Github Action to filter pull requests and issues from first-time contributors.
Get Workflow Origin: Github Action to provide information about the pull requests that triggered the workflow for the pull_request and pull_request_review events or for the workflow_run event that is triggered by one of those events.
Github Script: Github Action to make it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context.
Gitleaks: Github Action to detect hardcoded secrets like passwords, api keys, and tokens in git repos.
Horusec: Github Action to identify vulnerabilities in your project.
Paths Filter: Github Action that enables conditional execution of workflow steps and jobs, based on the files modified by pull request, on a feature branch, or by the recently pushed commits.
Pull Request: GitHub Action to create pull requests automatically.
Purge Artifacts: Github Action responsible for deleting old artifacts by setting expire duration.
Set Secrets: Github Action to Create or edit actions secrets in repository or organizations.
Skip duplicate: GitHub Action to skip duplicate workflow-runs (after merges, pull requests or similar), skip concurrent or parallel workflow-runs for things that you do not want to run twice, skip ignored paths to speedup documentation-changes or similar, skip if paths not changed for something like directory-specific tests, cancel outdated workflow-runs after branch-pushes.
Stale: GitHub Action to warn and then close issues and PRs that have had no activity for a specified amount of time.
Recreate Release: Github Action to delete previous release by tag_name or release_name and then call actions/create-release to create it again.
Release: GitHub Action for creating GitHub Releases on Linux, Windows, and macOS virtual environments.
Repository-Dispatch: GitHub Action to create a repository dispatch event.
Retry Action: GitHub Action to rerun another GitHub Actions and commands.
Super Linter: Github Action to help validate your source code.
Upload Artifact: Github Action to share data between jobs and store data once a workflow is complete (example).
Download Artifact: Github Action to download artifacts from your build (example).
οΏ½?οΏ½ Docker Actions
Hadolint: Github Action to run Hadolint and reports violations given a Dockerfile within a repository on a pull request.
Phonito: Github Action to automate scanning Docker images for OS & library vulnerabilities. Need a free Phonito Security account at https://phonito.io.
Publish Docker: Github Action to build and push containers.
οΏ½? How to create new actions
The Github tutorial is great to understand how to create:
π€ How to test actions locally
This tool can be used to test actions locally: Act
οΏ½? Contribution
Would like to contribute to the repository? Here are the guidelines
(Made with contributors-img)


