Skip to content

Commit

Permalink
Merge pull request #1 from tiagovrtr/init
Browse files Browse the repository at this point in the history
Adapt GitHub Actions to pipenv
  • Loading branch information
tiagovrtr authored Sep 23, 2022
2 parents 0e9948e + 81c126b commit 56ad3c4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 38 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
poetry-version: [1.0, 1.1.15]
pipenv-version: ["v2022.9.8", "v2022.9.21"]
os: [ubuntu-18.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -22,9 +22,9 @@ jobs:
- name: Run image
uses: ./
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
pipenv-version: ${{ matrix.pipenv-version }}
- name: View pipenv --help
run: pipenv --help
release:
if: github.event_name == 'push'
needs: ci
Expand All @@ -39,8 +39,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag -d v2
git push --delete origin v2
git push origin :refs/tags/v2
git tag v2
git tag -d v1
git push --delete origin v1
git push origin :refs/tags/v1
git tag v1
git push --tags
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# actions-poetry
GitHub Actions for Python projects using poetry
# actions-pipenv
GitHub Actions for Python projects using pipenv.
Shameless adaptation of [abatilo/actions-poetry: GitHub Actions for Python projects using poetry](https://github.com/abatilo/actions-poetry)

[![license](https://img.shields.io/github/license/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/abatilo/actions-poetry.svg)](https://github.com/abatilo/actions-poetry/releases)
[![license](https://img.shields.io/github/license/tiagovrtr/actions-pipenv.svg)](https://github.com/tiagovrtr/actions-pipenv/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/tiagovrtr/actions-pipenv.svg)](https://github.com/tiagovrtr/actions-pipenv/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/tiagovrtr/actions-pipenv.svg)](https://github.com/tiagovrtr/actions-pipenv/releases)

- [python-poetry/poetry: Python dependency management and packaging made easy.](https://github.com/python-poetry/poetry)
- [pypa/pipenv: Python Development Workflow for Humans.](https://github.com/pypa/pipenv)

## Getting started

### Breaking changes for v2
We've drastically simplified this GitHub Action for v2. This is no longer a
Docker action that runs as its own container, it's just a simplified way for
you to install poetry. This action now makes an assumption that you've already
setup Python via `setup-python` or some other way. Since we're installing poetry directly to your environment, this also means that you can cache your dependencies more easily since everything is running on the host runner instead of an isolated container environment.
### Implementation notes
This action makes the assumption that you've already
setup Python via `setup-python` or some other way. Since we're installing pipenv directly to your environment, this also means that you can cache your dependencies more easily since everything is running on the host runner instead of an isolated container environment.

### Create your workflow
```yaml
Expand All @@ -26,29 +25,25 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
poetry-version: ["1.0", "1.1.15"]
pipenv-version: ["v2022.9.8", "v2022.9.21"]
os: [ubuntu-18.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: "pipenv"
- name: Run image
uses: abatilo/actions-poetry@v2
uses: tiagovrtr/actions-pipenv@v1
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
pipenv-version: ${{ matrix.pipenv-version }}
- name: View pipenv --help
run: pipenv --help
```
## License
[MIT License - abatilo/actions-poetry]
[MIT License - abatilo/actions-poetry]: https://github.com/abatilo/actions-poetry/blob/master/LICENSE
## About the author
- [abatilo's homepage](https://www.aaronbatilo.dev/)
[MIT License - abatilo/actions-poetry]: https://github.com/abatilo/actions-poetry/blob/master/LICENSE
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: "Python Poetry Action"
author: "@abatilo"
description: "An action to run https://github.com/python-poetry/poetry"
name: "Python Pipenv Action"
author: "@tiagovrtr"
description: "An action to run https://github.com/pypa/pipenv"
branding:
icon: "truck"
color: "gray-dark"
inputs:
poetry-version:
description: "The version of poetry to install"
pipenv-version:
description: "The version of pipenv to install"
required: true
default: "1.1.15"
default: "2022.9.21"
runs:
using: "composite"
steps:
- run: |
pip install poetry==${{ inputs.poetry-version }}
pip install pipenv==${{ inputs.pipenv-version }}
shell: bash

0 comments on commit 56ad3c4

Please sign in to comment.