forked from apache/incubator-kie-kogito-images
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SRVLOGIC-281: Move upstream-sync CI to kie-ci repository (#35)
- Loading branch information
1 parent
85e7ec8
commit 8fa7aab
Showing
1 changed file
with
4 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Sync main-apache branch with upstream/main | ||
name: Sync main-apache branch | ||
|
||
env: | ||
USERNAME: kie-ci | ||
USEREMAIL: [email protected] | ||
UPSTREAM_REMOTE: https://github.com/apache/incubator-kie-kogito-images.git | ||
GITHUB_TOKEN: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }} | ||
|
||
on: | ||
|
@@ -13,36 +10,11 @@ on: | |
|
||
jobs: | ||
sync-main-apache: | ||
if: github.repository_owner == 'kiegroup' | ||
name: Sync main-apache branch | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Sync main-apache branch with upstream/main | ||
uses: kiegroup/kie-ci/.ci/actions/upstream-sync@main | ||
with: | ||
token: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }} | ||
|
||
- 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 --tags | ||
|
||
- name: Checkout main-apache branch | ||
run: git checkout --track origin/main-apache | ||
|
||
- name: Pull main-apache branch | ||
run: git pull | ||
|
||
- name: Merge upstream/main branch | ||
run: git merge --no-edit upstream/main | ||
|
||
- name: Push changes | ||
run: git push | ||
|
||
- name: Push last tag | ||
run: git push origin $(git tag --sort=creatordate | tail -n 1) | ||
upstream_remote: https://github.com/apache/incubator-kie-kogito-images.git |