Skip to content

Commit

Permalink
Backport of when skip-ci is true do not trigger integration and go te…
Browse files Browse the repository at this point in the history
…sts into release/1.15.x (#18955)

backport of commit 89e15e4

Co-authored-by: NiniOak <anita.akaeze@hashicorp.com>
  • Loading branch information
hc-github-team-consul-core and NiniOak authored Sep 21, 2023
1 parent 5c52151 commit 40a98f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/filter_changed_files_go_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ for file_to_check in "${files_to_check[@]}"; do
echo -e $file_to_check
SKIP_CI=false
echo "Changes detected in non-documentation files - skip-ci: $SKIP_CI"
export $SKIP_CI
echo "skip-ci=$SKIP_CI" >> "$GITHUB_OUTPUT"
exit 0 ## if file is outside of the skipped_directory exit script
fi
done

echo -e "$files_to_check"
SKIP_CI=true
echo "Changes detected in only documentation files - skip-ci: $SKIP_CI"
export $SKIP_CI
echo "skip-ci=$SKIP_CI" >> "$GITHUB_OUTPUT"
4 changes: 1 addition & 3 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
fetch-depth: 0
- name: Get changed files
id: read-files
run: |
./.github/scripts/filter_changed_files_go_test.sh
echo "skip-ci=${SKIP_CI}" >> "${GITHUB_ENV}"
run: ./.github/scripts/filter_changed_files_go_test.sh

setup:
needs: [conditional-skip]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ jobs:
fetch-depth: 0
- name: Get changed files
id: read-files
run: |
./.github/scripts/filter_changed_files_go_test.sh
echo "skip-ci=${SKIP_CI}" >> "${GITHUB_ENV}"
run: ./.github/scripts/filter_changed_files_go_test.sh

setup:
needs: [conditional-skip]
Expand Down

0 comments on commit 40a98f4

Please sign in to comment.