Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #25 from MousaZeidBaker/feature/update-dependencie…
Browse files Browse the repository at this point in the history
…s-workflow

add workflow that updates dependencies
  • Loading branch information
MousaZeidBaker authored Jan 16, 2022
2 parents bfca0ae + c234bb5 commit 107391f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/update-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update Dependencies

# controls when the action will run
on:
schedule:
- cron: '0 6 1 * *' # at 06:00 on the first day of every month
workflow_dispatch: # enables manual trigger

jobs:
update_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install poetry 1.1.12
uses: snok/install-poetry@v1
with:
version: 1.1.12

- name: Update dependencies
run: |
pip install poetryup
poetryup
if [ -n "$(git status --porcelain)" ]; then
# working tree NOT clean, bump project version
poetry version patch
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: Update dependencies
title: Update dependencies
labels: |
patch
branch: update-dependencies
delete-branch: true
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ is that the latter also modifies the `pyproject.toml` file.
poetryup
```

## Automate Dependency Updates with GitHub Actions
Use PoetryUp with GitHub actions to automate the process of updating
dependencies, for reference see this project's [workflow
configuration](https://github.com/MousaZeidBaker/poetryup/blob/master/.github/workflows/update-dependencies.yaml).

## Contributing
Contributions are welcome via pull requests.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetryup"
version = "0.4.1"
version = "0.4.2"
description = "Update dependencies and bump their version in the pyproject.toml file"
authors = ["Mousa Zeid Baker"]
packages = [
Expand Down

0 comments on commit 107391f

Please sign in to comment.