Merge pull request #1 from 2ndWatch/aws_linked_accounts #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Export Conversion Rules | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- issue/** | |
jobs: | |
build: | |
name: Export Conversion Rules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Copy converter_base to current directory Linux, MacOS | |
run: | | |
cp -r focus_converter_base/* ./ | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Setup a local virtual environment | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
poetry lock | |
- uses: actions/cache@v3 | |
name: Define a cache for the virtual environment based on the dependencies lock file | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Create conversion rule export directory | |
run: | | |
mkdir -p conversion_rules_export/{markdown,csv} | |
mkdir -p progress | |
mkdir exported_sample_data | |
- name: Generate rule export | |
run: | | |
poetry run focus-export-conversion-rules --output-dir conversion_rules_export/markdown --output-format markdown | |
poetry run focus-export-conversion-rules --output-dir conversion_rules_export/csv --output-format csv | |
- name: Generate progress pie charts | |
run: | | |
poetry run focus-generate-progress-pie-chart --output-dir progress/ --csv-rules-export-dir conversion_rules_export/csv | |
- name: Generate converted sample data | |
run: | | |
poetry run focus-export-converted-sample-data --output-dir exported_sample_data | |
- name: Upload converted data to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: exported-sample-data | |
path: exported_sample_data | |
- name: Add & Commit | |
uses: EndBug/[email protected] | |
with: | |
add : "['conversion_rules_export', 'progress']" | |
author_name: FinOps Converter Bot | |
author_email: [email protected] | |
commit: --signoff |