Skip to content

STABLE - this commit is always on the top #22

STABLE - this commit is always on the top

STABLE - this commit is always on the top #22

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI Build on Stable Branch and Push to Cloud Repository
on:
push:
branches: [ "stable" ]
permissions:
contents: write
jobs:
pushToCloudRepository:
runs-on: ubuntu-latest
steps:
- name: Checkout external repo
uses: actions/checkout@v4
with:
repository: bytechefhq/bytechef-cloud
token: ${{ secrets.PRIVATE_REPOSITORY_GIT_API_TOKEN }} # PAT with 'repo' scope
path: bytechef-cloud
- name: Investigate private repository checkout results
run: |
pwd
ls -la
git branch
- name: Checkout code from current repository
uses: actions/checkout@v4
with:
ref: stable
fetch-depth: 0 # Need full history to remove commits
path: bytechef-public
- name: Remove last commit
run: |
git reset --hard HEAD~1
- name: Push to private repository
run: |
pwd
ls -la
git remote show
git push -f origin-cloud stable