Skip to main content

workflow-tools

Build Black Formatter GitHub License

CLI tools for GitHub Actions.

  • Automate writing GitHub workflow configs with a generator tool

  • Automate setting GitHub secrets for repositories

  • Integrate the tools into your pipeline for setting up new microservices

Rationale

Microservice architecture may have dozens and dozens of lookalikes services that require similar CI/CD workflows. With infrastructure as code approach taken by the GitHub Actions, why not using workflows generation? Setting up a new microservice repository may also be automated. This is where workflow-tools come in handy.

Examples

Let’s set GitHub Secrets for a repository. First, get a personal access token in GitHub settings. Then set up a secret using workflow-tools:

workflow_secret --owner=anna-money --repo=workflow-tools \
  --token="YOUR-PERSONAL-ACCESS-TOKEN" \
  update --key=MY_SECRET_KEY --value=MY_VALUE

Now let’s use a fragment of Jinja2 template for a GitHub Actions workflow to generate resulting config:

WORKFLOW_RUNNER_VERSION=ubuntu-18.04 WORKFLOW_PYTHON27=2.7 WORKFLOW_PYTHON37=3.7 \
workflow_generator
# Press Enter to start pasting Jinja2 workflow template into stdin
jobs:
  test:
    runs-on: [[ workflow.runner_version ]]
    strategy:
      matrix:
        python:
          - [[ workflow.python27 ]]
          - [[ workflow.python37 ]]
# Press Ctrl+D to render resulting workflow
# For real workflow templates use reading/writing from/to a file, load variables from envfile
jobs:
  test:
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        python:
          - 2.7
          - 3.7

Help

See documentation for more details. Use --help flag for each tool in the package.

Installation

Just run:

pip install -U workflow-tools

Contributing

See CONTRIBUTING.rst.

Changelog

0.6.0 (2020-04-01)

  • Update readthedocs config (#8) by @pilosus

0.5.0 (2020-04-01)

  • Fix autodocs (#7) by @pilosus

  • Add check docs step in CI/CD (#7) by @pilosus

  • Add badges to README (#7) by @pilosus

0.4.0 (2020-04-01)

  • Extend CI/CD flow with package check (#5) by @pilosus

  • Fix bugs with setup.py long description by @pilosus

0.3.0 (2020-03-31)

  • Add documentation and ReadTheDocs integration (#3) by @pilosus

0.2.0 (2020-03-30)

  • Use GitHub Actions for the project (#2) by @pilosus

0.1.0 (2020-03-30)

  • Move internal ANNA project to open source (#1) by @pilosus

  • Originally developed by Vitaly Samigullin (@pilosus) as internal ANNA project

Metadata

Release files for workflow-tools 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workflow-tools 0.6.0
File Size Uploaded
workflow_tools-0.6.0.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for workflow-tools 0.6.0
File Interpreter ABI Platform
workflow_tools-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / workflow_tools-0.6.0.tar.gz

Download URL workflow_tools-0.6.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1378ef430a4a555ad545a3f8b0d5263154718e77f43dabbd6e4ba67954875ca8
BLAKE2b-256 checksum
How to use checksums
17f3cdd249ae95d65b6ddfdd439aead127b3fe33b617d33ce6694d95eea787b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

Release files / workflow_tools-0.6.0-py3-none-any.whl

Download URL workflow_tools-0.6.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad3a2c4181634f0936510f04307ae548876f976cf88d83f4a34415e99324bb41
BLAKE2b-256 checksum
How to use checksums
50773f2a88f216b18d2277c2ed1c11ecde107e9754993ad17ed56faddaca2d56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page