Skip to content

Commit

Permalink
Use Docker Push
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritLHLS committed Dec 8, 2024
1 parent 0921aef commit 6dbb171
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/push_to_cnb.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push to CNB Repository
name: Push to CNB

on:
push:
Expand All @@ -10,21 +10,21 @@ jobs:
push-to-cnb:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
- name: Import to CNB
run: |
git config --global user.name "cnb"
git config --global user.email "[email protected]"
- 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 }}
docker run --rm \
-e PLUGIN_SOURCE_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
-e PLUGIN_SOURCE_URL="https://github.com" \
-e PLUGIN_SOURCE_PLATFORM="github" \
-e PLUGIN_SOURCE_REPO="oneclickvirt/ecs" \
-e PLUGIN_CNB_ROOT_ORGANIZATION="oneclickvirt" \
-e PLUGIN_CNB_TOKEN="${{ secrets.CNB_TOKEN }}" \
-e PLUGIN_CNB_URL="https://cnb.cool" \
-e PLUGIN_MIGRATE_FORCE_PUSH="true" \
-e PLUGIN_MIGRATE_LOG_LEVEL="debug" \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
cnbcool/code-import

0 comments on commit 6dbb171

Please sign in to comment.