Skip to content

fix workflow

fix workflow #4

name: Push to skymp5-patches
on:
push:
branches:
- main
- push-skymp5-patches
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout skyrim-multiplayer/skymp5-patches
# https://github.com/actions/checkout/issues/197#issuecomment-971545044
uses: Pospelove/checkout@main
with:
repository: skyrim-multiplayer/skymp5-patches
# submodules: recursive
fetch-depth: 0
token: ${{ secrets.SKYMP5_PATCHES_PAT }}
path: /home/runner/work/skymp5-patches
ref: main
- name: Checkout skyrim-multiplayer/skymp
# https://github.com/actions/checkout/issues/197#issuecomment-971545044
uses: Pospelove/checkout@main
with:
repository: skyrim-multiplayer/skymp5
# submodules: recursive
fetch-depth: 0
path: /home/runner/work/skymp
ref: main
- name: Set skymp5-patches main branch to skymp main branch
run: |
cd /home/runner/work/skymp5-patches
git checkout main
git remote add skymp /home/runner/work/skymp || true
git fetch skymp main
git reset --hard skymp/main
git push origin main
# - name: Update patches main branch
# env:
# ACCESS_TOKEN: ${{ secrets.SKYMP5_PATCHES_PUSH_MAIN_TOKEN }}
# run: |
# git config --global user.name 'SkyMP Bot'
# git config --global user.email 'dummy@nic11.xyz'
# git remote add patches https://x-access-token:${ACCESS_TOKEN}@github.com/skyrim-multiplayer/skymp5-patches.git
# git push patches main