From ffb71490f7c3305cf0b950bfe715e14a9e68b82d Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 1 Nov 2024 13:10:12 -0400 Subject: [PATCH] Set env var with path to input XML in separate step Signed-off-by: Joyce Quach --- .github/workflows/convert-cci-list.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/convert-cci-list.yml b/.github/workflows/convert-cci-list.yml index 8db822bbb..ef80fae14 100644 --- a/.github/workflows/convert-cci-list.yml +++ b/.github/workflows/convert-cci-list.yml @@ -42,10 +42,11 @@ jobs: xpath: '//*[local-name()="metadata"]/*[local-name()="publishdate"]' namespaces: '{"ns": "http://iase.disa.mil/cci"}' + - name: Set root directory path for produced XML file + run: echo "ROOT_DIRECTORY=$(pwd)" >> $GITHUB_ENV + - name: Convert CCI List XML to two JSON files - run: | - ROOT_DIRECTORY=$(pwd) - yarn workspace @mitre/hdf-converters cciListXml2json $ROOT_DIRECTORY/U_CCI_List.xml U_CCI_List.nist.json U_CCI_List.defs.json + run: yarn workspace @mitre/hdf-converters cciListXml2json $ROOT_DIRECTORY/U_CCI_List.xml U_CCI_List.nist.json U_CCI_List.defs.json - name: Update CCI to NIST and CCI to Definition mappings run: | @@ -55,5 +56,11 @@ jobs: - name: Commit changes to CciNistMappingData.ts env: DATETIME: ${{steps.publish-date.outputs}} + # run: | + # git config --local user.email "saf@groups.mitre.org" + # git config --local user.name "MITRE SAF Automation" + # git add libs/hdf-converters/src/mappings/CciNistMappingData.ts + # git commit -sm "Update CCI List to the current NIST and definition mappings as of $DATETIME" + # git push run: | echo $DATETIME