Skip to content

Commit

Permalink
Created upstream-sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fantonangeli committed Dec 20, 2023
1 parent 9195350 commit 6219b57
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sync main-apache branch with upstream/main

env:
USERNAME: github-actions[bot]
USEREMAIL: github-actions[bot]@users.noreply.github.com
UPSTREAM_REMOTE: https://github.com/apache/incubator-kie-kogito-serverless-operator.git

on:
schedule:
- cron: "0 0 * * *" # every day at midnight
workflow_dispatch:

jobs:
sync-main-apache:
name: Sync main-apache branch
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup git environment
run: |
git config --global user.name "$USERNAME"
git config --global user.email "$USEREMAIL"
git remote add upstream $UPSTREAM_REMOTE
- name: Fetch all
run: git fetch --all

- name: Checkout main-apache branch
run: git checkout --track origin/main-apache

- name: Merge upstream/main branch
run: git merge --no-edit upstream/main

- name: Push changes
run: git push origin main-apache

0 comments on commit 6219b57

Please sign in to comment.