diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 9a7ea1d..18156e9 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -47,8 +47,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: setup upterm session - uses: lhotari/action-upterm@v1 +# - name: setup upterm session +# uses: lhotari/action-upterm@v1 - name: check for changes in helm-chart directory id: check_changes @@ -56,15 +56,14 @@ jobs: # fetch all git fetch --all - # get the base commit (before the merge) - BASE_COMMIT=$(git merge-base HEAD origin/main) - - # get the list of files changed in the pull request - CHANGED_FILES=$(git diff --name-only $BASE_COMMIT HEAD) + # get the list of files changed in the pull request compared to the last commit + CHANGED_FILES=$(git diff --name-only HEAD~) # check if any files in the helm-chart/ directory have changed - if echo "$CHANGED_FILES" | grep -q "^helm-chart/"; then - echo "Changes detected in the helm-chart/ directory." + echo "$CHANGED_FILES" | grep -q "^helm-chart/"; + if [ $? -eq 0 ]; then + echo + "Changes detected in the helm-chart/ directory." echo "continue=true" >> $GITHUB_OUTPUT else echo "No changes detected in the helm-chart/ directory. Exiting." @@ -72,7 +71,6 @@ jobs: exit 0 fi - - name: determine version increment if: steps.check_label.outputs.continue == 'true' && steps.check_changes.outputs.continue == 'true' id: determine-version