Unverified Commit 3ad6132c authored by Ted Themistokleous's avatar Ted Themistokleous Committed by GitHub
Browse files

Update github action for onnxruntime sync to open autoPR (#1606)

* Update github action for onnxruntime sync to open autoPR
parent 69799cb8
name: Onnxruntime main weekly sync name: Onnxruntime main weekly sync
on: on:
schedule: schedule:
- cron: "05 17 * * 1" - cron: '27 18 * * 4'
jobs: jobs:
createPullRequest:
name: Update and create pull request
runs-on: ubuntu-latest runs-on: ubuntu-latest
sync:
steps: steps:
- name: get_date
run: echo todays_date="$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: extract_sha1
run: echo onnxsha="$(git ls-remote https://github.com/microsoft/onnxruntime.git HEAD | awk '{print $1}')" >> $GITHUB_ENV
- name: echo_sha1
run: echo ${{ env.onnxsha }}
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: develop ref: develop
path: ../
get_date:
steps:
- run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
update_file: - name: update_file
needs: [sync get_date] run: echo ${{ env.onnxsha }} > test/onnx/.onnxrt-commit
steps:
- run: git clone https://github.com/microsoft/onnxruntime.git && cd onnxruntime && git rev-parse HEAD >> ../test/onnx/.onnxrt-commit
Add_commit: - name: Make changes to pull request
needs: update_file uses: peter-evans/create-pull-request@v4
steps:
- name: Add & Commit
uses: EndBug/add-and-commit@v9.1.1
with: with:
new_branch: onnxruntime-sync-${{ steps.date.outputs.date }} token: ${{ secrets.GITHUB_TOKEN }}
add: ../test/onnx/.onnxrt-commit commit-message: Update onnxruntime main ${{ env.onnxsha }}
message: Update Onnxruntime commit to latest release committer: Github <noreply@github.com>
default_author: github_actions author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
push: true signoff: false
PR: branch: onnxruntime-sync-${{ env.todays_date }}
needs: Add_commit delete-branch: true
steps: title: 'Onnxruntime Weekly Sync ${{ env.todays_date }}'
- name: GitHub Action for creating Pull Requests body: |
uses: devops-infra/action-pull-request@v0.5.3 Update CI point for Onnxruntime builds
with: - Updated with changes from ${{ env.todays_date }}
github_token: ${{ secrets.GITHUB_TOKEN }} - Auto-generated by [create-pull-request][1]
title: Sync Onnxruntime main - Update .onnxrt-commit to ${{ env.onnxsha }}
reviewer: pfultz2, causten
assignee: TedThemistokleous [1]: https://github.com/peter-evans/create-pull-request
label: automatic, onnxruntime labels: |
target_branch: develop onnxruntime
dependancies
automated
assignees: TedThemistokleous
reviewers: TedThemistokleous causten
draft: false
base: develop
\ 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