Skip to content

Commit 1b2eb32

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

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 code from current repository
23+
uses: actions/checkout@v3
24+
with:
25+
ref: stable
26+
fetch-depth: 0 # Need full history to remove commits
27+
- name: Remove last commit
28+
run: |
29+
git reset --hard HEAD~1
30+
- name: Push to private repository
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }} # Needed to push to private repository
33+
run: |
34+
git remote add origin-cloud-4-url https://igorbeslic:${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }}@github.com/bytechefhq/bytechef-cloud.git
35+
echo "Added repository: git remote add origin-cloud-4-url https://igorbeslic:${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }}@github.com/bytechefhq/bytechef-cloud.git"
36+
echo "See token: $GITHUB_TOKEN"
37+
echo $GITHUB_TOKEN
38+
git remote show
39+
git push -f origin-cloud-4-url stable
40+

0 commit comments

Comments
 (0)