Skip to content

Commit 2b8da9c

Browse files
committed
STABLE - this commit is always on the top
1 parent 2099af1 commit 2b8da9c

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
7+
8+
name: CI Build on Stable Branch and Push to Cloud Repository
9+
10+
on:
11+
push:
12+
branches: [ "stable" ]
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
pushToCloudRepository:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout external repo
23+
uses: actions/checkout@v4
24+
with:
25+
repository: bytechefhq/bytechef-cloud
26+
token: ${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }} # PAT with 'repo' scope
27+
path: bytechef-merge
28+
- name: Investigate private repository checkout results
29+
run: |
30+
pwd
31+
ls -la bytechef-merge
32+
cd bytechef-merge
33+
git branch
34+
git remote show
35+
- name: Checkout code from current repository
36+
uses: actions/checkout@v4
37+
with:
38+
repository: bytechefhq/bytechef
39+
token: ${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }} # PAT with 'repo' scope
40+
ref: stable
41+
fetch-depth: 0 # Need full history to remove commits
42+
path: bytechef-merge
43+
- name: Remove last commit
44+
run: |
45+
pwd
46+
cd bytechef-public
47+
ls -la
48+
git remote show
49+
git reset --hard HEAD~1
50+
git remote show
51+
echo "Done with git preparation"
52+
- name: Push to private repository
53+
run: |
54+
pwd
55+
ls -la
56+
cd bytechef-public
57+
git remote show
58+
git push -f origin-remote stable
59+

0 commit comments

Comments
 (0)