diff --git a/.github/scripts/exclude_ci_files.txt b/.github/scripts/exclude_ci_files.txt new file mode 100644 index 0000000000..f012ba28c3 --- /dev/null +++ b/.github/scripts/exclude_ci_files.txt @@ -0,0 +1,45 @@ +.github/actionlint.yaml +.github/dependabot.yml +.github/labeler.yml +.github/PULL_REQUEST_TEMPLATE.md +.github/release.yml +.github/actions/certify-openshift-image/action.yml +.github/config/config-oss-* +.github/config/config-plus-* +.github/data/matrix-regression.json +.github/ISSUE_TEMPLATE/* +.github/scripts/create-release-tarballs.sh +.github/scripts/docker-updater.sh +.github/scripts/release-notes-update.sh +.github/scripts/release-version-update.sh +.github/workflows/build-base-images.yml +.github/workflows/build-test-image.yml +.github/workflows/cache-update.yml +.github/workflows/cherry-pick.yml +.github/workflows/codeql-analysis.yml +.github/workflows/create-release-branch.yml +.github/workflows/dependabot-auto-merge.yml +.github/workflows/dependabot-hugo.yml +.github/workflows/dependency-review.yml +.github/workflows/dockerhub-description.yml +.github/workflows/fossa.yml +.github/workflows/image-promotion.yml +.github/workflows/issues.yaml +.github/workflows/labeler.yml +.github/workflows/lint-format.yml +.github/workflows/mend.yml +.github/workflows/notifications.yml +.github/workflows/oss-release.yml +.github/workflows/patch-image.yml +.github/workflows/plus-release.yml +.github/workflows/publish-helm.yml +.github/workflows/regression.yml +.github/workflows/release-pr.yml +.github/workflows/release.yml +.github/workflows/retag-images.yml +.github/workflows/scorecards.yml +.github/workflows/stale.yml +.github/workflows/update-docker-images.yml +.github/workflows/update-docker-sha.yml +.github/workflows/updates-notification.yml +.github/workflows/version-bump.yml diff --git a/.github/scripts/variables.sh b/.github/scripts/variables.sh index 5742c99cf9..f4a1d60850 100755 --- a/.github/scripts/variables.sh +++ b/.github/scripts/variables.sh @@ -30,7 +30,15 @@ get_chart_md5() { } get_actions_md5() { - find .github -type f -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }' + exclude_list="$(dirname $0)/exclude_ci_files.txt" + find_command="find .github -type f -not -path '${exclude_list}'" + while IFS= read -r file + do + find_command+=" -not -path '$file'" + done < "$exclude_list" + + find_command+=" -exec md5sum {} +" + eval "$find_command" | LC_ALL=C sort | md5sum | awk '{ print $1 }' } get_build_tag() {