Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-software-pl committed Jun 5, 2024
1 parent bd9b2f5 commit 0723fdc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/scripts/publishNuInstallationExample.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
#!/bin/bash -e

# Define folder to push
FOLDER_TO_PUSH="examples/installation/"
if [ -z "$ACCESS_TOKEN" ]; then
echo "ACCESS_TOKEN variable has to be defined"
exit 1
fi

# Define target repository details
TARGET_OWNER="TouK"
TARGET_REPO="nussknacker-installation-example"
TARGET_BRANCH="master" # adjust as needed
git config --global credential.useHttpPath true

# Clone the target repository
git clone https://github.com/$TARGET_OWNER/$TARGET_REPO.git temp_repo
rm -rf nu-installation-example-repo
git clone git@github.com:TouK/nussknacker-installation-example.git nu-installation-example-repo

# Copy the folder to the cloned repository
rm -rf temp_repo/*
cp -r $FOLDER_TO_PUSH temp_repo/
rm -rf nu-installation-example-repo/*
cp -r "examples/installation/" nu-installation-example-repo/

# Push the changes to the target repository
cd temp_repo
cd nu-installation-example-repo
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git add .
git commit -m "Push $FOLDER_TO_PUSH from source repository"
git push -f origin $TARGET_BRANCH
git push -f origin "master"

0 comments on commit 0723fdc

Please sign in to comment.