-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
42 lines (41 loc) · 1.19 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
inputs:
working-directory:
description: The working directory where the commands are run
required: false
default: ./
runs:
using: "composite"
steps:
- name: Setup virtualenv
run: |
echo "::group::Setup virtualenv"
export CFN_LINT_VENV="${HOME}/.virtualenvs/cfn-lint"
python -m venv "${CFN_LINT_VENV}"
export PATH_TO_CFN_LINT="${CFN_LINT_VENV}/bin"
echo "PATH_TO_CFN_LINT=${PATH_TO_CFN_LINT}" >> $GITHUB_ENV
echo "::endgroup::"
shell: bash
- name: Install cfn-lint
run: |
echo "::group::Install cfn-lint"
. "${PATH_TO_CFN_LINT}/activate"
python -m pip install --upgrade cfn-lint>=1.6.1 cfn-lint-ax>=1.0.0
deactivate
echo "::endgroup::"
shell: bash
- name: Print versions
run: |
echo "::group::Print versions"
. "${PATH_TO_CFN_LINT}/activate"
python -m pip freeze
deactivate
echo "::endgroup::"
shell: bash
- name: Run cfn-lint
run: |
echo "::group::Run cfn-lint"
${PATH_TO_CFN_LINT}/cfn-lint
echo "::endgroup::"
shell: bash
working-directory: ${{ inputs.working-directory }}