From dd4a4e317bdb9da4e3ec43a47051b0da070dc369 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 8 Dec 2024 08:54:17 +0000 Subject: [PATCH] Push to CNB Repository --- .github/workflows/push_to_cnb.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/push_to_cnb.yaml diff --git a/.github/workflows/push_to_cnb.yaml b/.github/workflows/push_to_cnb.yaml new file mode 100644 index 0000000..4cc107d --- /dev/null +++ b/.github/workflows/push_to_cnb.yaml @@ -0,0 +1,30 @@ +name: Push to CNB Repository + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + push-to-cnb: + runs-on: ubuntu-latest + steps: + - name: Checkout source repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "cnb" + git config --global user.email "cnb@users.noreply.github.com" + + - name: Push to CNB repository + run: | + echo "Setting up remote repository..." + git remote add cnb-remote https://cnb:${{ secrets.CNB_TOKEN }}@cnb.cool/oneclickvirt/ecs + echo "Pushing to remote repository..." + git push cnb-remote main:main --force + env: + CNB_TOKEN: ${{ secrets.CNB_TOKEN }} \ No newline at end of file