Skip to content

Commit 562e551

Browse files
daquinteroflexmomchil-flex
authored andcommitted
🔧 Remove latest notebook submodule checks
1 parent 932b29c commit 562e551

File tree

2 files changed

+13
-31
lines changed

2 files changed

+13
-31
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,29 @@ jobs:
2929
NOTEBOOKS_PATH=docs/notebooks
3030
FAQ_PATH=docs/faq
3131
32-
# Checking out Notebooks submodule with the same branch as the main project
32+
# Checking out Notebooks submodule with the same branch as the main project/develop
3333
echo "Checking $NOTEBOOKS_PATH for updates..."
3434
cd $NOTEBOOKS_PATH
3535
NOTEBOOKS_CURRENT_COMMIT=$(git rev-parse HEAD)
3636
echo $(git fetch --all --verbose)
3737
echo $(git remote get-url origin)
38-
if git show-ref --verify refs/remotes/origin/latest; then
39-
echo "Branch latest exists."
38+
if git show-ref --verify refs/remotes/origin/develop; then
39+
echo "Branch develop exists."
4040
else
41-
echo "::error::Branch latest does not exist on remote."
41+
echo "::error::Branch develop does not exist on remote."
4242
exit 1
4343
fi
44-
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/latest)
44+
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/develop)
4545
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
4646
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"
4747
4848
4949
cd ../..
5050
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
51-
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the latest branch. Please update it."
51+
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the develop branch. Please update it."
5252
exit 1
5353
else
54-
echo "Submodule $NOTEBOOKS_PATH is up to date with the latest branch."
54+
echo "Submodule $NOTEBOOKS_PATH is up to date with the develop branch."
5555
fi
5656
5757
# Checking FAQs only on the develop branch.

.github/workflows/test_pr_latest_submodule.yaml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,6 @@ jobs:
1919
# This fetches only a single branch by default, so additional fetch is needed
2020
fetch-depth: 0 # Optionally, set to 0 to fetch all history for all branches and tags
2121

22-
- name: Determine current branch or PR ref
23-
id: get_branch
24-
run: |
25-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
26-
# Extract the base branch of the PR
27-
BRANCH_NAME="${{ github.event.pull_request.base.ref }}"
28-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
29-
else
30-
# Assume it's a push event, extract the branch name from $GITHUB_REF
31-
BRANCH_NAME=$(echo $GITHUB_REF | sed 's|refs/heads/||')
32-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
33-
fi
34-
# Now echoing the BRANCH_NAME to verify
35-
echo "BRANCH_NAME: $BRANCH_NAME"
36-
shell: bash
37-
env:
38-
GITHUB_REF: ${{ github.ref }}
39-
4022
- name: Initialize and update submodule
4123
run: |
4224
git submodule update --init --recursive
@@ -53,23 +35,23 @@ jobs:
5335
NOTEBOOKS_CURRENT_COMMIT=$(git rev-parse HEAD)
5436
echo $(git fetch --all --verbose)
5537
echo $(git remote get-url origin)
56-
if git show-ref --verify refs/remotes/origin/$BRANCH_NAME; then
57-
echo "Branch $BRANCH_NAME exists."
38+
if git show-ref --verify refs/remotes/origin/develop; then
39+
echo "Branch develop exists."
5840
else
59-
echo "::error::Branch $BRANCH_NAME does not exist on remote."
41+
echo "::error::Branch develop does not exist on remote."
6042
exit 1
6143
fi
62-
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/${{ env.BRANCH_NAME }})
44+
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/develop)
6345
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
6446
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"
6547
6648
6749
cd ../..
6850
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
69-
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the ${{ env.BRANCH_NAME }} branch. Please update it."
51+
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the develop branch. Please update it."
7052
exit 1
7153
else
72-
echo "Submodule $NOTEBOOKS_PATH is up to date with the ${{ env.BRANCH_NAME }} branch."
54+
echo "Submodule $NOTEBOOKS_PATH is up to date with the develop branch."
7355
fi
7456
7557
# Checking FAQs only on the develop branch.

0 commit comments

Comments
 (0)