Skip to content

Commit

Permalink
Set VERSION and CLONE_DIR in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
carleeto committed Aug 9, 2023
1 parent 9a98130 commit 1e9b8ad
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/scripts/check-pending-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
set -e
set -x

VERSION=$(cat package.json | jq -r '.version')
CLONE_DIR="./imx-docs"
if [ -z "VERSION" ]
then
echo "VERSION is not set"
exit 1
fi

if [ -z "$CLONE_DIR" ]
then
echo "CLONE_DIR is not set"
exit 1
fi

INPUT_DESTINATION_HEAD_BRANCH="ts-immutable-sdk-docs-$VERSION"

cd "$CLONE_DIR"
Expand Down
15 changes: 13 additions & 2 deletions .github/scripts/push-docs-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
set -e
set -x

VERSION=$(cat package.json | jq -r '.version')
CLONE_DIR="./imx-docs"
if [ -z "VERSION" ]
then
echo "VERSION is not set"
exit 1
fi

if [ -z "$CLONE_DIR" ]
then
echo "CLONE_DIR is not set"
exit 1
fi


INPUT_SOURCE_FOLDER="./docs/"
INPUT_DESTINATION_REPO="immutable/imx-docs"
INPUT_DESTINATION_HEAD_BRANCH="ts-immutable-sdk-docs-$VERSION"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
path: imx-docs
ref: main

- name: Setup environment variables
run: |
echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
echo "CLONE_DIR="./imx-docs" >> $GITHUB_ENV
- name: Pending release check
run: ./.github/scripts/check-pending-release.sh
shell: bash
Expand Down

0 comments on commit 1e9b8ad

Please sign in to comment.