-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd9b2f5
commit 0723fdc
Showing
2 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
24 changes: 11 additions & 13 deletions
24
.github/workflows/scripts/publishNuInstallationExample.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
File renamed without changes.