Skip to content

measures_common

measures_common #13

name: measures_common
on: [workflow_call, workflow_dispatch]
jobs:
update:
runs-on: windows-2019
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: dst
- name: dotenv
uses: falti/dotenv-action@v1
with:
path: ./.github/workflows/.env
- name: checkout NREL/openstudio-common-measures-gem
uses: actions/checkout@v4
with:
repository: NREL/openstudio-common-measures-gem
ref: ${{ steps.dotenv.outputs.MEASURES_VERSION }}
path: src
sparse-checkout: |
lib/measures/ChangeBuildingLocation
lib/measures/SetLightingLoadsByLPD
lib/measures/set_electric_equipment_loads_by_epd
lib/measures/set_space_infiltration_per_exterior_area
- name: copy files from NREL/openstudio-common-measures-gem
shell: bash
run: |
ls
cp -r src/lib/measures/ChangeBuildingLocation/* dst/measures/ChangeBuildingLocation/
cp -r src/lib/measures/SetLightingLoadsByLPD/* dst/measures/SetLightingLoadsByLPD/
cp -r src/lib/measures/set_electric_equipment_loads_by_epd/* dst/measures/set_electric_equipment_loads_by_epd/
cp -r src/lib/measures/set_space_infiltration_per_exterior_area/* dst/measures/set_space_infiltration_per_exterior_area/
- name: upload files
uses: actions/upload-artifact@v3
with:
name: measures
path: measures
pull-request:
needs: update
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- name: list
run: |
ls measures/
- name: pull request
uses: peter-evans/create-pull-request@v5
with:
commit-message: update measures common
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: '[action] update measures common'
branch: action/update-measures-common
base: main