Skip to main content

Update GitHub Actions Workflows

Project description

update-workflows

PyPI Changelog Tests License

Run this tool to update .github/workflows/*.yml files based on a configuration file.

Usage

python -m update_workflows

This reads .github/workflows.yml which contains references to workflow templates:

- simonw/python-test
- simonw/python-publish

Or with custom filenames:

test: simonw/python-test
publish: simonw/python-publish

The command will fetch the latest version of each workflow from the simonw/actions-workflows repository and update the corresponding files in .github/workflows/.

List Format

When using the list format, the workflow filename is derived from the template name:

- simonw/python-test

This creates/updates .github/workflows/python-test.yml

Dict Format

When using the dict format, you specify custom filenames:

test: simonw/python-test
publish: simonw/python-publish

This creates/updates:

  • .github/workflows/test.yml
  • .github/workflows/publish.yml

CLI Options

Basic Options

# Dry-run mode (shows what would be updated)
python -m update_workflows --dry-run

Bulk Operations

# Process all projects in current directory and subdirectories
# (finds all directories with .github/workflows.yml)
python -m update_workflows --all

# Process all projects with dry-run
python -m update_workflows --all --dry-run

Git Integration

# Update and commit changes with auto-generated message
python -m update_workflows --commit

# Update, commit, and push changes
python -m update_workflows --push

# Process all projects, committing and pushing updates
python -m update_workflows --all --push

The --commit option automatically generates commit messages in the format:

update-workflows: test.yml, publish.yml

The --push option implies --commit, so you don't need to specify both.

Note: You cannot use --commit or --push with --dry-run.

Example: Bulk Update Multiple Projects

If you have a directory structure like:

dev/
  my-project-1/
    .github/workflows.yml
    .github/workflows/test.yml
  my-project-2/
    .github/workflows.yml
    .github/workflows/publish.yml

Run this from the dev/ directory:

cd dev
python -m update_workflows --all --push

This will:

  1. Find all projects with .github/workflows.yml
  2. Update the workflow files in each project
  3. Commit the changes in each project's git repository
  4. Push the commits to each project's remote

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

update_workflows-0.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

update_workflows-0.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file update_workflows-0.2.tar.gz.

File metadata

  • Download URL: update_workflows-0.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for update_workflows-0.2.tar.gz
Algorithm Hash digest
SHA256 dc9564917d972a580d6d1bcd6e1646b5c557511d38d0fcf5a606128f16171e78
MD5 257709905483da89f0e225106e651a3a
BLAKE2b-256 e20c8fe69ecea016e9a731596983a648e4ed1b6a035a2a7fea670779d3c8d692

See more details on using hashes here.

Provenance

The following attestation bundles were made for update_workflows-0.2.tar.gz:

Publisher: publish.yml on simonw/update-workflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file update_workflows-0.2-py3-none-any.whl.

File metadata

  • Download URL: update_workflows-0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for update_workflows-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e784c1544b08a3e453016cc4677f577b9009ad4d5e48afd5aa04447172d07986
MD5 15207369af379d98c7895cccd311f62b
BLAKE2b-256 5cf90a617d921f98dfc25e50623494bc1e9d3015eeb901e75e01829390b7c709

See more details on using hashes here.

Provenance

The following attestation bundles were made for update_workflows-0.2-py3-none-any.whl:

Publisher: publish.yml on simonw/update-workflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page