Factor out setup
This commit is contained in:
@@ -16,6 +16,4 @@ runs:
|
||||
# Install packer.io
|
||||
curl -O https://releases.hashicorp.com/packer/${{ inputs.version }}/packer_${{ inputs.version }}_linux_amd64.zip
|
||||
unzip packer_${{ inputs.version }}_linux_amd64.zip
|
||||
mkdir -p ~/bin/
|
||||
chmod +x packer
|
||||
mv packer ~/bin/packerio
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Setup environment
|
||||
description: Sets up some basic components of the environment
|
||||
inputs:
|
||||
ansible:
|
||||
description: Install Ansible as well
|
||||
required: false
|
||||
default: false
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Python 3
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3"
|
||||
- name: Setup pip cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: python-pip
|
||||
- name: Install Pip and tox
|
||||
shell: bash
|
||||
run: |
|
||||
set -exo pipefail
|
||||
python3 -m pip install -U pip
|
||||
pip install -U wheel
|
||||
pip install -U tox
|
||||
- name: Install Ansible
|
||||
if: inputs.ansible
|
||||
shell: bash
|
||||
run: |
|
||||
set -exo pipefail
|
||||
pip install -U ansible
|
||||
ansible-galaxy collection install -r ansible/requirements.yml
|
||||
Reference in New Issue
Block a user