Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hatch/environment/create action #204

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions hatch/environment/create/action.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense as an action since we have to do it in so many places and the logic is all in the action.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Setup environment"
description: "Setup a python environment with `hatch`, `pip`, and `changie` installed"

inputs:
python-version:
description: "The version of python to install"
default: "3.8"

runs:
using: composite
steps:
- name: "[DEBUG] Inputs"
shell: bash
run: |
echo "==========INPUTS=========="
echo python-version : ${{ inputs.python-version }}

- name: "Install 'python${{ inputs.python-version }}`"
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: "Install `hatch`"
shell: bash
run: python -m pip install --upgrade pip hatch

- name: "Install `changie`"
shell: bash
run: |
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
brew tap miniscruff/changie https://github.com/miniscruff/changie
brew install changie

- name: "[DEBUG] Outputs"
shell: bash
run: |
echo "==========OUTPUTS=========="
echo "N/A"