forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
schedule: | ||
- cron: '0 */2 * * *' | ||
# scheduled every 2 hours | ||
workflow_dispatch: # click the button on Github repo! | ||
|
||
jobs: | ||
sync_with_upstream: | ||
runs-on: ubuntu-latest | ||
name: Sync main with upstream latest | ||
|
||
steps: | ||
# Step 1: run a standard checkout action, provided by github | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch | ||
- name: Pull (Fast-Forward) upstream changes | ||
id: sync | ||
uses: aormsby/[email protected] | ||
with: | ||
upstream_repository: apache/tvm | ||
upstream_branch: main | ||
target_branch: main | ||
git_pull_args: --ff-only # optional arg use, defaults to simple 'pull' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} # optional, for accessing repos that require authentication | ||
|
||
# Step 3: Display a message if 'sync' step had new commits (simple test) | ||
- name: Check for new commits | ||
if: steps.sync.outputs.has_new_commits | ||
run: echo "There were new commits." | ||
|
||
# Step 4: Print a helpful timestamp for your records (not required, just nice) | ||
- name: Timestamp | ||
run: date |