Skip to content

Commit 814915c

Browse files
committed
flesh out readme
1 parent 4f94575 commit 814915c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
11
# Python Versionator - Github Action
2+
3+
This Github Action is part of the [Multi-Py Project](https://github.com/multi-py). It works alongside the [Multi-Py Image Builder Action](https://github.com/multi-py/action-python-image-builder) to continuously release multiarchitecture containers.
4+
5+
The Versionator takes three primary actions-
6+
7+
* Updates a designated workflow with the most recent versions of a Python package.
8+
* Updates that same workflow with the most recent Python versions.
9+
* Updates the project README file based off of the templates in this project.
10+
11+
In other words, when a Python package gets pushed to PyPI this action will update workflows to use it. This is how Multi-Py can release new containers quickly after upstream packages are released.
12+
13+
## Example Workflow
14+
15+
```yaml
16+
# Every 30 minutes check for a new version of the package.
17+
on:
18+
push:
19+
branches:
20+
- 'main'
21+
schedule:
22+
- cron: '0,30 * * * *'
23+
24+
jobs:
25+
Version-Updater:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v2
30+
with:
31+
# Github Actions can't be granted the required workflow
32+
# permissions, so it has to be a Personal Access Token.
33+
token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
34+
35+
- name: "Update Build Workflow"
36+
uses: multi-py/action-python-versionator@main
37+
with:
38+
package: "uvicorn"
39+
git_name: "Robert Hafner"
40+
git_email: "user@example.com"
41+
action_path: ${{ github.workspace }}/.github/workflows/build_and_push.yml
42+
```
43+
44+
## Readme Templates
45+
46+
The default templates are very specific to the Multi-Py project. Templates can be overridden- by default any files in your repo's `templates` directory will get used instead of the action ones. A `README.md` file will replace the entire default template, or specific components can be overridden while allowing the others to remain (`description.md`, `quick_start.md`, `tags.md`, `documentation.md`). The `template_directory` parameter can be used to specific a different template directory.

0 commit comments

Comments
 (0)