Skip to content

Commit

Permalink
Update sync-repo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ioworker0 authored Mar 18, 2024
1 parent 8e8c11a commit e2583ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/sync-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,52 @@ jobs:
build:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write

steps:
- uses: actions/checkout@v4
with:
ref: mm-unstable
path: linux

- name: add-remote
run: |
cd linux
git remote add kernel git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
git remote -v
- name: pull-push-mm-unstable
run: |
cd linux
git pull -f kernel mm-unstable
git push -f origin mm-unstable
- uses: actions/checkout@v4
with:
ref: mm-stable
path: linux

- name: pull-push-mm-stable
run: |
cd linux
git pull -f kernel mm-stable
git push -f origin mm-stable
- uses: actions/checkout@v4
with:
ref: master
path: linux

- name: pull-push-master
run: |
cp linux/.github/workflows/sync-repo.yml .
cd linux
git pull -f kernel master
mkdir -p .github/workflows
git add .github/workflows/sync-repo.yml
git commit -m "[AUTO-COMMIT] AUTO SYNC KERNEL REPO" .github/workflows/sync-repo.yml
git push -f origin master

0 comments on commit e2583ae

Please sign in to comment.