Generate single inventory #72
Workflow file for this run
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
# This workflow will generate inventory files based on user input | |
name: Generate single inventory | |
on: | |
workflow_dispatch: # manual trigger only | |
inputs: | |
year: | |
description: "Year" | |
required: true | |
default: "2016-2018" | |
inventory: | |
description: "Inventory" | |
required: true | |
default: "TRI" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Update pip & install testing pkgs | |
run: | | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
- name: Install package and dependencies | |
run: | | |
pip install . | |
- name: Generate inventory files | |
env: | |
YEAR: ${{ github.event.inputs.year }} | |
INVENTORY: ${{ github.event.inputs.inventory }} | |
run: | | |
echo "Year: ${{ github.event.inputs.year }}" | |
echo "Inventory: ${{ github.event.inputs.inventory }}" | |
python scripts/generate_select_inventories.py --years $YEAR --inventory $INVENTORY | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: "${{ github.event.inputs.inventory }}" | |
# A file, directory or wildcard patter that describes what to upload | |
path: | # uses local user data dir for ubuntu | |
~/.local/share/stewi/facility/* | |
~/.local/share/stewi/flow/* | |
~/.local/share/stewi/flowbyfacility/* | |
~/.local/share/stewi/flowbyprocess/* | |
~/.local/share/stewi/validation/* | |
~/.local/share/stewi/*.json | |
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` | |
# retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. |