Skip to content

Commit

Permalink
Add merge upstream workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-ky committed Nov 19, 2023
1 parent e0b9ba5 commit 3176fb1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/merge-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Merge VSCode Upstream

on:
schedule:
- cron: "58 13 * * *" # Run task everyday on 1358 UTC
workflow_dispatch:

env:
UPSTREAM_REPO: "https://github.com/microsoft/vscode.git"
MERGE_UPSTREAM_BRANCH: "main"

concurrency:
group: upstream_merge
cancel-in-progress: true

permissions:
contents: write

jobs:
merge-upstream:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v4

- name: Fetch upstream repository
run: |
git remote add upstream "$UPSTREAM_REPO"
git fetch upstream
- name: Rebase with upstream repository
run: |
git config user.name github-actions
git config user.email [email protected]
git rebase upstream/"$MERGE_UPSTREAM_BRANCH"
- name: Push changes
run: |
git push origin --all
git push origin --tags

0 comments on commit 3176fb1

Please sign in to comment.