forked from mlcommons/inference
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.04 KB
/
Copy pathauto-update-dev.yml
File metadata and controls
40 lines (33 loc) · 1.04 KB
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
name: Auto-Update Dev Branches from Master
on:
push:
branches:
- master # Trigger workflow on commits to 'master' branch.
workflow_dispatch: {}
jobs:
update-dev:
if: github.repository_owner == 'mlcommons'
strategy:
matrix:
branch: [ "dev", "docs" ]
runs-on: ubuntu-latest
permissions:
contents: write # Required to push to protected branches
steps:
- name: Checkout Main Branch
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Configure Git User
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Merge auto-update into ${{ matrix.branch }}
run: |
git fetch origin master:master
git merge --no-ff master -m "Auto-merge updates from master branch"
- name: Push Changes to ${{ matrix.branch }}
run: |
git push origin ${{ matrix.branch }}