update-actions-package
A tool to automatically update your github actions.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.8%) to scientific vocabulary
Repository
A tool to automatically update your github actions.
Basic Info
- Host: GitHub
- Owner: GitHubToolbox
- License: mit
- Language: Python
- Default Branch: master
- Size: 126 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
Overview
A Python script to automate the updating of GitHub Actions in a specified folder by checking for newer versions on GitHub and updating the pinned versions based on their commit SHAs. This tool is useful for keeping GitHub Actions up-to-date across multiple workflows in a repository.
Features
- Automatic Version Updates: Checks for the latest version of each GitHub Action and updates to the latest version if available.
- Dry Run Mode: Preview changes without modifying any files.
- Backup Creation: Optionally create backups of modified files before updates.
- Recursive Directory Scan: Supports scanning all subdirectories for GitHub Actions.
- Rate Limit Handling: Automatically detects GitHub API rate limits and waits or skips requests accordingly.
- Verbose Output: Provides detailed information about the update process.
Prerequisites
This script requires Python 3.6 or higher. The following Python packages are also needed:
requests: For making HTTP requests to the GitHub API.packaging: For handling version comparison.tabulate: For displaying summary statistics in a table format.
Installation
- Clone this repository:
bash
git clone https://github.com/GitHubToolbox/github-actions-updater.git
cd github-actions-updater
- Install the required packages using
pip:
bash
pip install requests packaging tabulate
Usage
Run the script with the following command-line arguments:
bash
python github_actions_updater.py --path <folder_path> [OPTIONS]
Command-Line Arguments
--path: (Optional) Path to the folder containing GitHub Actions files. Default is the current directory (.).--github-token: (Optional) GitHub personal access token for authenticated requests. Provides higher API rate limits.--dry-run: (Optional) If specified, prints changes without modifying files.--backup: (Optional) If specified, creates a backup of each file before updating.--extensions: (Optional) Comma-separated list of file extensions to check. Default isyml,yaml.--recursive: (Optional) If specified, recursively searches subdirectories.--verbose: (Optional) If specified, prints detailed information about the update process.
Examples
- Basic Usage:
Update GitHub Actions in the current directory:
bash
python github_actions_updater.py --path .
- Dry Run:
Preview changes without making any updates:
bash
python github_actions_updater.py --path /path/to/folder --dry-run
- Recursive Search:
Search all subdirectories for GitHub Actions files:
bash
python github_actions_updater.py --path /path/to/folder --recursive
- With Backup:
Create a backup before updating any files:
bash
python github_actions_updater.py --path /path/to/folder --backup
- Authenticated Requests:
Use a GitHub token to increase the rate limit:
bash
python github_actions_updater.py --path /path/to/folder --github-token YOUR_GITHUB_TOKEN
Handling GitHub API Rate Limits
The script handles rate limits by checking the GitHub API response. If the rate limit is reached, it will either wait until the rate limit resets or skip further API requests, depending on the configured behaviour.
For more frequent updates or larger repositories, it is recommended to use a GitHub personal access token with the --github-token option to increase the rate limit.
Owner
- Name: GitHub Toolbox
- Login: GitHubToolbox
- Kind: organization
- Email: github@wolfsoftware.com
- Location: United Kingdom
- Website: https://wolfsoftware.com
- Twitter: wolfsoftware
- Repositories: 2
- Profile: https://github.com/GitHubToolbox
An assortment of tools for interacting with GitHub. Created by Wolf Software
Citation (CITATION.cff)
cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: GitHub Actions Version Updater.
abstract: GitHub Actions Version Updater.
type: software
version: 0.1.0
date-released: 2024-09-10
repository-code: https://github.com/GitHubToolbox/update-actions-package
keywords:
- "Wolf Software"
- "Software"
license: MIT
authors:
- family-names: "Wolf"
orcid: "https://orcid.org/0009-0007-0983-2072"
GitHub Events
Total
- Delete event: 65
- Issue comment event: 90
- Push event: 59
- Pull request review event: 60
- Pull request event: 124
- Create event: 62
Last Year
- Delete event: 65
- Issue comment event: 90
- Push event: 59
- Pull request review event: 60
- Pull request event: 124
- Create event: 62
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 0
- Total pull requests: 87
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.09
- Merged pull requests: 63
- Bot issues: 0
- Bot pull requests: 87
Past Year
- Issues: 0
- Pull requests: 87
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.09
- Merged pull requests: 63
- Bot issues: 0
- Bot pull requests: 87
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (101)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- actions/setup-python f677139bbe7f9c59b41e40162b753c062f5d49a3 composite
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- citation-file-format/cffconvert-github-action 4cf11baa70a673bfdf9dad0acc7ee33b3f4b6084 composite
- ruby/setup-ruby f26937343756480a8cb3ae1f623b9c8d89ed6984 composite
- Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- github/codeql-action/analyze a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
- github/codeql-action/autobuild a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
- github/codeql-action/init a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
- Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
- Mattraks/delete-workflow-runs 39f0bbed25d76b34de5594dceab824811479e5de composite
- dependabot/fetch-metadata dbb049abf0d677abbd7f7eee0375145b417fdd34 composite
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- actions/setup-node 0a44ba7841725637a19e28fa30b79a866c81b0a6 composite
- ruby/setup-ruby f26937343756480a8cb3ae1f623b9c8d89ed6984 composite
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- actions/setup-python f677139bbe7f9c59b41e40162b753c062f5d49a3 composite
- softprops/action-gh-release c062e08bd532815e2082a85e87e3ef29c3e6d191 composite
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- actions/setup-python f677139bbe7f9c59b41e40162b753c062f5d49a3 composite
- softprops/action-gh-release c062e08bd532815e2082a85e87e3ef29c3e6d191 composite
- actions/first-interaction 34f15e814fe48ac9312ccf29db4e74fa767cbab7 composite
- Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
- otto-de/purge-deprecated-workflow-runs 31a4e821d43e9a354cbd65845922c76e4b4b3633 composite
- ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- actions/setup-go 0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 composite
- actions/setup-python f677139bbe7f9c59b41e40162b753c062f5d49a3 composite
- actions/checkout eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 composite
- zgosalvez/github-actions-ensure-sha-pinned-actions ed00f72a3ca5b6eff8ad4d3ffdcacedb67a21db1 composite
- Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
- actions/stale 28ca1036281a5e5922ead5184a1bbf96e5fc984e composite
- packaging ==24.1
- requests ==2.32.3
- tabulate ==0.9.0