Skip to content

Update Fork

Update Fork #573

Workflow file for this run

name: Update Fork
on:
schedule:
- cron: '0 0 * * *' # Запуск ежедневно в полночь
workflow_dispatch: # Позволяет вручную запускать workflow
jobs:
update-fork:
runs-on: ubuntu-latest
steps:
- name: Checkout Upstream Repository
uses: actions/checkout@v3.5.2
with:
repository: ryanmcdermott/clean-code-javascript
token: ${{ secrets.GITHUB_TOKEN }}
ref: master
path: upstream
- name: Checkout Fork Repository
uses: actions/checkout@v3.5.2
with:
ref: master
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Add Upstream Remote
run: git remote add upstream https://github.com/ryanmcdermott/clean-code-javascript.git
- name: Fetch Upstream
run: git fetch upstream
- name: Checkout Default Branch
run: git checkout master
- name: Merge Upstream Changes
run: |
git merge upstream/master --allow-unrelated-histories -m "Merge upstream changes"
- name: Push Changes
run: git push origin master