Skip to content

Commit

Permalink
ci: now using KALISIO_GITHUB_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Jun 7, 2024
1 parent e2bf5db commit 5c51d3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh -k kli
- name: Build app
env:
Expand All @@ -36,7 +36,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh -k nokli
- name: Build docs
env:
Expand Down
7 changes: 2 additions & 5 deletions scripts/setup_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail
THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
THIS_DIR=$(dirname "$THIS_FILE")
ROOT_DIR=$(dirname "$THIS_DIR")
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"

. "$THIS_DIR/kash/kash.sh"

Expand Down Expand Up @@ -38,17 +39,13 @@ done
begin_group "Setting up workspace ..."

if [ "$CI" = true ]; then
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
DEVELOPMENT_REPO_URL="https://$GITHUB_DEVELOPMENT_TOKEN@github.com/kalisio/development.git"

# workaround since repo is named 'kano' and in kli file it's 'maps'
cd "$WORKSPACE_DIR"
mv "kano" "maps" && ln -s "maps" "kano"
cd ~-
else
shift $((OPTIND-1))
WORKSPACE_DIR="$1"
DEVELOPMENT_REPO_URL="$GITHUB_URL/kalisio/development.git"

# unset KALISIO_DEVELOPMENT_DIR because we want kli to clone everyhting in $WORKSPACE_DIR
unset KALISIO_DEVELOPMENT_DIR
Expand All @@ -57,7 +54,7 @@ fi
setup_app_workspace \
"$ROOT_DIR" \
"$WORKSPACE_DIR" \
"$DEVELOPMENT_REPO_URL" \
"$KALISIO_GITHUB_URL/kalisio/development.git" \
"$WORKSPACE_NODE" \
"workspaces/apps" \
"$WORKSPACE_KIND" \
Expand Down

0 comments on commit 5c51d3c

Please sign in to comment.