Metadata-Version: 2.1
Name: workflow-tools
Version: 0.4.0
Summary: CLI tools for GitHub Actions
Home-page: https://github.com/anna-money/workflow-tools
Author: Absolutely No Nonsense Admin Ltd.
Author-email: hello@anna.money
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Environment :: Console
Classifier: Environment :: MacOS X
Classifier: Topic :: Internet
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4
Description-Content-Type: text/x-rst
Requires-Dist: Jinja2 (>=2.11.1)
Requires-Dist: Click (<8.0,>=7.0)
Requires-Dist: PyNaCl (<2.0,>=1.3.0)
Requires-Dist: requests (<3.0,>=2.22.0)

workflow-tools
==============

|Build|





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``:

.. code-block:: bash

  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:

.. code-block:: bash

  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:

.. code-block:: bash

  pip install -U workflow-tools


Contributing
------------

See `CONTRIBUTING.rst`_.

.. |Build| image:: https://github.com/anna-money/workflow-tools/workflows/master/badge.svg
   :target: https://github.com/anna-money/workflow-tools/actions?query=workflow%3Amaster

.. _GitHub Actions: https://help.github.com/en/actions
.. _GitHub Secrets: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
.. _personal access token: https://github.com/settings/tokens
.. _Jinja2: https://jinja.palletsprojects.com/
.. _documentation: https://workflow-tools.readthedocs.io/
.. _CONTRIBUTING.rst: https://github.com/anna-money/workflow-tools/tree/master/CONTRIBUTING.rst


Changelog
---------

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


