Skip to content

Sync Fork

Sync Fork #97

Workflow file for this run

name: Sync Fork
on:
schedule:
- cron: '0 6 * * 6' # every 30 minutes
workflow_dispatch: # on button click
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sync with remote
shell: pwsh
env:
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
run: |
ECHO "git config"
git config --global user.email "$env:GIT_EMAIL"
git config --global user.name "VSLCatena_GHService"
ECHO "remote add github https://github.com/webdevops/Dockerfile"
git remote add github https://github.com/webdevops/Dockerfile
ECHO "checkout master"
git checkout master
ECHO "git status"
git status
ECHO "git fetch github master"
git fetch github master
ECHO "git merge -s recursive -X theirs github/master --allow-unrelated-histories"
git merge -s recursive -X theirs github/master --allow-unrelated-histories
ECHO "git push -u origin $GITHUB_REF"
git push -u origin $GITHUB_REF
ECHO "git status"
git status