haydn: Add workflow to push latest changes automatically
This commit is contained in:
32
.github/workflows/sync.yml
vendored
Normal file
32
.github/workflows/sync.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Sync to Evolution-X-Devices
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- evo
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'Haydn-Lab/device_xiaomi_haydn'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout source repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git identity
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
|
||||
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
|
||||
|
||||
- name: Force Push to Target Repository
|
||||
run: |
|
||||
|
||||
git config --unset-all http.https://github.com/.extraheader
|
||||
|
||||
git remote add target https://x-access-token:${{ secrets.TARGET_REPO_TOKEN }}@github.com/Evolution-X-Devices/device_xiaomi_haydn.git
|
||||
|
||||
git push target evo:bka --force
|
||||
Reference in New Issue
Block a user