Trigger action (#2070)

* push triggers.txt

* tricky whitespace

* remove from gitignore

* add

* echo output for debug

* change path
This commit is contained in:
David Holdeman 2020-12-12 20:36:41 -06:00 committed by GitHub
parent a7ff26d3c3
commit 840e260b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View File

@ -10,6 +10,7 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
fetch-depth: 0
- name: Discover cores
run: lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
@ -42,3 +43,31 @@ jobs:
- name: Generate Code Coverage
working-directory: ./unit_tests/
run: ./ci_gcov.sh ${{ secrets.RUSEFI_DOXYGEN_FTP_USER }} ${{ secrets.RUSEFI_DOXYGEN_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
# Commit changes and catch the error that occurs if nothing has been changed (without catching other errors)
- name: Commit changes
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub build-unit-tests Action"
git add triggers.txt
git status
OUT=$(git commit -m "Trigger wheel definitions" triggers.txt 2>&1) || echo "commit failed, finding out why"
echo "$OUT"
if echo "$OUT" | grep 'nothing to commit'; then
echo "::set-env name=NOCOMMIT::true"
exit 0
elif echo "$OUT" | grep 'changed'; then
exit 0
else
exit 1
fi
- name: Push configs
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master' && env.NOCOMMIT != 'true'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: master

View File

@ -2,5 +2,4 @@
build/
gcov_working_area
triggers
triggers.txt
*.logicdata