Commit b9267878 authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Update github action for onnxruntime sync to open autoPR

Add better handling of sync action and set this to weekly cron while also
opening up PR.

Adds PR labels and reviewrs for sync action
parent d83b8397
name: Onnxruntime main weekly sync name: Onnxruntime main weekly sync
on: on:
schedule: schedule:
- cron: "05 17 * * 1" - cron: '50 10 * * 3'
jobs: jobs:
runs-on: ubuntu-latest createPullRequest:
sync: name: Update and create pull request
runs-on: self-hosted
steps: steps:
- uses: actions/checkout@v3 - name: cleanup-old-runs
with: run: rm -rf onnxruntime
ref: develop
path: ../
get_date: - name: get_date
steps: run: echo todays_date="$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
update_file: - name: get-onnxrt-main
needs: [sync get_date] run: git clone https://github.com/microsoft/onnxruntime.git
steps:
- run: git clone https://github.com/microsoft/onnxruntime.git && cd onnxruntime && git rev-parse HEAD >> ../test/onnx/.onnxrt-commit
Add_commit: - name: extract_sha1
needs: update_file run: cd onnxruntime && echo onnxsha="$(git rev-parse HEAD)" >> $GITHUB_ENV
steps:
- name: Add & Commit - name: echo_sha1
uses: EndBug/add-and-commit@v9.1.1 run: echo ${{ env.onnxsha }}
- name: cleanup-run
run: rm -rf onnxruntime
- uses: actions/checkout@v3
with: with:
new_branch: onnxruntime-sync-${{ steps.date.outputs.date }} ref: master
add: ../test/onnx/.onnxrt-commit
message: Update Onnxruntime commit to latest release - name: update_file
default_author: github_actions run: echo ${{ env.onnxsha }} > test/onnx/.onnxrt-commit
push: true
PR: - name: Make changes to pull request
needs: Add_commit uses: peter-evans/create-pull-request@v4
steps:
- name: GitHub Action for creating Pull Requests
uses: devops-infra/action-pull-request@v0.5.3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
title: Sync Onnxruntime main commit-message: Update onnxruntime main ${{ env.onnxsha }}
reviewer: pfultz2, causten committer: Github <noreply@github.com>
assignee: TedThemistokleous author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
label: automatic, onnxruntime signoff: false
target_branch: develop branch: onnxruntime-sync-${{ env.todays_date }}
delete-branch: true
title: 'Onnxruntime Weekly Sync ${{ env.todays_date }}'
body: |
Update CI point for Onnxruntime builds
- Updated with changes from ${{ env.todays_date }}
- Auto-generated by [create-pull-request][1]
- Update .onnxrt-commit to ${{ env.onnxsha }}
[1]: https://github.com/peter-evans/create-pull-request
labels: |
onnxruntime
dependancies
automated
assignees: TedThemistokleous
reviewers: TedThemistokleous causten
draft: false
base: master
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment