Fix issues with run-time-preprocessing tflite-cpp #199
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 add/update the default dockerfile for any updated CM scripts | |
name: Dockerfile update for CM scripts | |
on: | |
push: | |
branches: [ "master", "dev" ] | |
paths: | |
- 'cm-mlops/script/**_cm.json' | |
jobs: | |
dockerfile: | |
if: github.repository == 'mlcommons/ck' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: getfile | |
run: | | |
echo "files=$(git diff --name-only ${{ github.event.before }} | xargs)" >> $GITHUB_OUTPUT | |
- name: Update dockerfile | |
run: | | |
for file in ${{ steps.getfile.outputs.files }}; do | |
echo $file | |
done | |
python3 -m pip install cmind | |
cm pull repo --url=https://github.com/${{ github.repository }} --checkout=${{ github.ref_name }} | |
python3 tests/script/process_dockerfile.py ${{ steps.getfile.outputs.files }} | |
FOLDER=`cm find repo mlcommons@ck | cut -d' ' -f3` | |
USER=cTuning | |
[email protected] | |
git config --global user.name "$USER" | |
git config --global user.email "$EMAIL" | |
git remote set-url origin https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com/${{ github.repository }} | |
git add *.Dockerfile | |
git diff-index --quiet HEAD || (git commit -am "Updated dockerfile" && git push) |