Update sync-repo.yml #24
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
name: SYNC REPO | |
on: | |
push: | |
branches: [ "master" ] | |
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 | |
git ls-remote kernel | |
# - name: pull-push-mm-unstable | |
# run: | | |
# cd linux | |
# git fetch kernel mm-unstable | |
# git push -f origin kernel/mm-unstable:mm-unstable | |
# - uses: actions/checkout@v4 | |
# with: | |
# ref: mm-stable | |
# path: linux | |
# - name: pull-push-mm-stable | |
# run: | | |
# cd linux | |
# git fetch kernel mm-stable | |
# git push -f origin kernel/mm-stable:mm-unstable | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
path: linux | |
- name: pull-push-master | |
run: | | |
cp linux/.github/workflows/sync-repo.yml . | |
cd linux | |
# git fetch kernel master | |
# git push -f origin kernel/master:master | |
cd .. | |
git pull [email protected]:ioworker0/linux.git linux1 | |
cd linux1 | |
mkdir -p .github/workflows | |
cp ../sync-repo.yml .github/workflows/sync-repo.yml | |
git add .github/workflows/sync-repo.yml | |
git commit -m "[AUTO-COMMIT] AUTO SYNC KERNEL REPO" .github/workflows/sync-repo.yml | |
# git push origin master | |