Skip to content

Commit 7f09c44

Browse files
committed
Add use of the right GH Token and push last tag
1 parent 6219b57 commit 7f09c44

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/upstream-sync.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Sync main-apache branch with upstream/main
22

33
env:
4-
USERNAME: github-actions[bot]
5-
USEREMAIL: github-actions[bot]@users.noreply.github.com
4+
USERNAME: kie-ci
5+
USEREMAIL: kie-ci0@redhat.com
66
UPSTREAM_REMOTE: https://github.com/apache/incubator-kie-kogito-serverless-operator.git
7+
GITHUB_TOKEN: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }}
78

89
on:
910
schedule:
@@ -17,7 +18,9 @@ jobs:
1718

1819
steps:
1920
- name: Checkout repository
20-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
22+
with:
23+
token: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }}
2124

2225
- name: Setup git environment
2326
run: |
@@ -26,14 +29,19 @@ jobs:
2629
git remote add upstream $UPSTREAM_REMOTE
2730
2831
- name: Fetch all
29-
run: git fetch --all
32+
run: git fetch --all --tags
3033

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

37+
- name: Pull main-apache branch
38+
run: git pull
39+
3440
- name: Merge upstream/main branch
3541
run: git merge --no-edit upstream/main
3642

3743
- name: Push changes
38-
run: git push origin main-apache
44+
run: git push
3945

46+
- name: Push last tag
47+
run: git push origin $(git tag --sort=creatordate | tail -n 1)

0 commit comments

Comments
 (0)