-
Notifications
You must be signed in to change notification settings - Fork 835
63 lines (57 loc) · 2.01 KB
/
log_binary_size_pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Binary Size Log PR
# Submits a PR with all the size profiling logs from $LOG_BRANCH
# This is intended to be used with the logs stored by log_binary_size.yml
#
# Points that can be confusing:
# * git checkout --track <remote>/<branch> creates a local tracking branch from a remote
# branch reference and changes to that branch.
# * git checkout <branch> -- <path> checks out files from <branch> into the current branch.
# It does not switch branches.
#
# The provided token must be able to submit a PR
on:
workflow_dispatch: {}
# uncomment this section to run on schedule
schedule:
# 6am PT 15 and 30th of month
# - cron: '0 13 15,30 * *'
# 6am PT every sunday
- cron: '0 13 * * 0'
# uncomment this section to run on a tag
# pull_request:
# types: [labeled]
# branches:
# - main
env:
LOG_BRANCH: profiling-logs
jobs:
binary-size-log:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:test')) ||
github.event_name == 'schedule'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
- name: prepare files for logging
run: |
git checkout --track origin/$LOG_BRANCH
git checkout main
git checkout $LOG_BRANCH -- data/continuous_builds/size_profiling/
- name: Create Logs PR Request
id: create-pr
uses: peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
with:
branch: binary_size_profiling_update
delete-branch: true
token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
title: Automated binary size log update
commit-message: Automated binary size log update
committer: TFLM-bot <[email protected]>
author: TFLM-bot <[email protected]>
body: "BUG=automated binary size log update"
labels: ci:run
reviewers: advaitjain