# YAML schema for GitHub Actions: # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions # # Helpful YAML parser to clarify YAML syntax: # https://yaml-online-parser.appspot.com/ # name: Sync from Upstream TF on: schedule: # 2pm UTC is 7am or 8am PT depending on daylight savings. - cron: '0 14 * * *' # Allow manually triggering of the workflow. workflow_dispatch: {} jobs: sync: runs-on: ubuntu-latest if: | github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro') steps: - uses: actions/setup-python@v7 with: python-version: '3.10' - uses: actions/checkout@v7 with: token: ${{ secrets.TFLM_BOT_REPO_TOKEN }} - uses: bazel-contrib/setup-bazel@0.18.0 with: bazelisk-cache: true disk-cache: true repository-cache: true - name: Install dependencies for sync run: | pip3 install numpy - name: Sync the code run: | ./ci/sync_from_upstream_tf.sh git config --local user.name "TFLM-bot" git config --local user.email "tflm-github-bot@google.com" git add * if [[ $(git status --porcelain | wc -l) == 0 ]]; then echo "no changes" else git commit -m "Sync from upstream TF." fi - name: Create Pull Request id: create-pr uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 with: branch: sync-from-upstream-tf delete-branch: true token: ${{ secrets.TFLM_BOT_REPO_TOKEN }} title: Automated sync from github.com/tensorflow/tensorflow commit-message: Automated sync from github.com/tensorflow/tensorflow committer: TFLM-bot author: TFLM-bot body: "BUG=automated sync from upstream\nNO_CHECK_TFLITE_FILES=automated sync from upstream" labels: bot:sync-tf, ci:ready reviewers: suleshahid