Merge pull request #56 from AndrewRathbun/main #40
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: XML Manifests Converter | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push events but only for the main branch | |
push: | |
branches: [ main ] | |
paths: ["ETWProvidersManifests/**.xml"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner. | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 #install the python needed | |
- name: Install dependencies | |
run: | | |
python3.8 -m pip install --upgrade pip | |
python3.8 -m pip install csvtomd | |
python3.8 -m pip install pandas | |
- name: Delete previous CSV entries | |
run: | | |
rm -r ETWEventsList/ | |
- name: Execute converter | |
run: | | |
echo "Running etw-to-csv converter..." | |
python3.8 ./Scripts/etw-to-csv.py | |
- name: Delete previous CSV entries for Stats Providers | |
run: | | |
find ETWProvidersCSVs -type f -name '*.csv' -exec rm -f {} \; | |
- name: Execute CSV Provider generator | |
run: | | |
echo "Running stats.py generator..." | |
python3.8 ./Scripts/stats.py | |
- name: Commit generated data to local repository | |
run: | | |
git config --global user.name 'Github Actions'; | |
git config --global user.email '[email protected]'; | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/nasbench/EVTX-ETW-Resources; | |
git add --all; | |
if [ "`git diff --cached --numstat | wc -l`" != "0" ]; | |
then | |
git commit -m "New converted CSV's generated by CICD"; | |
git push; | |
else | |
echo "No new modifications were made since previous commit"; | |
fi |