From 81c126bff51a86e63edb3a46227360df9c570c5e Mon Sep 17 00:00:00 2001 From: Tiago Reis Date: Fri, 23 Sep 2022 14:54:12 +0100 Subject: [PATCH] Adapt GitHub Actions to pipenv --- .github/FUNDING.yml | 1 - .github/workflows/ci.yml | 16 ++++++++-------- README.md | 39 +++++++++++++++++---------------------- action.yml | 14 +++++++------- 4 files changed, 32 insertions(+), 38 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b01e4c1..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -custom: ['https://www.buymeacoffee.com/abatilo'] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ec9a1a..ecb34e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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 diff --git a/README.md b/README.md index 2e65a86..0df653a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -26,7 +25,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: @@ -34,21 +33,17 @@ jobs: - 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 \ No newline at end of file diff --git a/action.yml b/action.yml index fd66613..a0e3893 100644 --- a/action.yml +++ b/action.yml @@ -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