Sync Fork #99
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 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 | |