diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90a9c13c..415bfc51 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -215,8 +215,6 @@ jobs: steps: - name: Checkout to branch uses: actions/checkout@v3 - with: - fetch-depth: 2 - name: Run changed-files with a single commit history id: changed-files diff --git a/HISTORY.md b/HISTORY.md index f42bbd20..fd58d612 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,16 +1,34 @@ # Changelog -## [v34.0.1](https://github.com/tj-actions/changed-files/tree/v34.0.1) (2022-10-31) +## [v34.0.2](https://github.com/tj-actions/changed-files/tree/v34.0.2) (2022-10-31) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.0.1) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.0.2) ## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-10-31) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.0.0...v34) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.0.1...v34) **Fixed bugs:** - \[BUG\] Action fails on initial commit [\#715](https://github.com/tj-actions/changed-files/issues/715) + +**Merged pull requests:** + +- chore: update docs [\#733](https://github.com/tj-actions/changed-files/pull/733) ([jackton1](https://github.com/jackton1)) +- Updated README.md [\#732](https://github.com/tj-actions/changed-files/pull/732) ([jackton1](https://github.com/jackton1)) +- chore: fix detecting changes with the first PR commit [\#731](https://github.com/tj-actions/changed-files/pull/731) ([jackton1](https://github.com/jackton1)) +- chore: update docs [\#730](https://github.com/tj-actions/changed-files/pull/730) ([jackton1](https://github.com/jackton1)) +- chore: update debug message [\#729](https://github.com/tj-actions/changed-files/pull/729) ([jackton1](https://github.com/jackton1)) +- fix: bug detecting initial commits [\#728](https://github.com/tj-actions/changed-files/pull/728) ([jackton1](https://github.com/jackton1)) +- Upgraded to v34.0.1 [\#727](https://github.com/tj-actions/changed-files/pull/727) ([jackton1](https://github.com/jackton1)) +- Updated README.md [\#726](https://github.com/tj-actions/changed-files/pull/726) ([jackton1](https://github.com/jackton1)) + +## [v34.0.1](https://github.com/tj-actions/changed-files/tree/v34.0.1) (2022-10-31) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.0.0...v34.0.1) + +**Fixed bugs:** + - \[BUG\] Auto-Merge not working properly on Change-Detection for PRs [\#713](https://github.com/tj-actions/changed-files/issues/713) **Closed issues:** @@ -34,7 +52,7 @@ ## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v34.0.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0) **Fixed bugs:** @@ -47,13 +65,13 @@ - feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1)) - Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1)) -## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v33) - ## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33.0.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v33.0.0) + +## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33) **Closed issues:** @@ -134,7 +152,7 @@ ## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v32.0.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v32.0.0) **Merged pull requests:** @@ -145,13 +163,13 @@ - chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate)) - Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1)) -## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v31) - ## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31.0.3) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.3) + +## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31) **Fixed bugs:** @@ -191,7 +209,7 @@ ## [v31.0.0](https://github.com/tj-actions/changed-files/tree/v31.0.0) (2022-09-25) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v30...v31.0.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v30.0.0...v31.0.0) **Merged pull requests:** @@ -204,13 +222,13 @@ - chore: update broken link [\#642](https://github.com/tj-actions/changed-files/pull/642) ([jackton1](https://github.com/jackton1)) - Upgraded to v30.0.0 [\#641](https://github.com/tj-actions/changed-files/pull/641) ([jackton1](https://github.com/jackton1)) -## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v30.0.0...v30) - ## [v30.0.0](https://github.com/tj-actions/changed-files/tree/v30.0.0) (2022-09-24) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v30.0.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v30...v30.0.0) + +## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v30) **Fixed bugs:** @@ -226,13 +244,13 @@ - chore\(deps\): update codacy/codacy-analysis-cli-action action to v4.2.0 [\#634](https://github.com/tj-actions/changed-files/pull/634) ([renovate[bot]](https://github.com/apps/renovate)) - Upgraded to v29.0.9 [\#633](https://github.com/tj-actions/changed-files/pull/633) ([jackton1](https://github.com/jackton1)) -## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v29.0.9) - ## [v29](https://github.com/tj-actions/changed-files/tree/v29) (2022-09-20) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v29) + +## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29.0.9) **Implemented enhancements:** @@ -1157,7 +1175,7 @@ ## [v12](https://github.com/tj-actions/changed-files/tree/v12) (2021-12-14) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v12) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v12) **Implemented enhancements:** @@ -1175,13 +1193,13 @@ - \[PR 1\]: Renamed all\_modified\_files to all\_changed\_files [\#283](https://github.com/tj-actions/changed-files/pull/283) ([jackton1](https://github.com/jackton1)) - Upgraded to v11.9 [\#280](https://github.com/tj-actions/changed-files/pull/280) ([jackton1](https://github.com/jackton1)) -## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v11.9) - ## [v11](https://github.com/tj-actions/changed-files/tree/v11) (2021-12-04) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v11) + +## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11.9) **Implemented enhancements:** @@ -1270,7 +1288,7 @@ ## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.1) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v1.2.1) **Implemented enhancements:** @@ -1284,13 +1302,13 @@ - Update actions/checkout action to v2.4.0 [\#243](https://github.com/tj-actions/changed-files/pull/243) ([renovate[bot]](https://github.com/apps/renovate)) - Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1)) -## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30) - -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v11.5) - ## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v1.2.0) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.0) + +## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v11.5) **Merged pull requests:** diff --git a/README.md b/README.md index 3710affe..d84da97e 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ See [outputs](#outputs) for a list of all available outputs. - name: Get changed files id: changed-files uses: tj-actions/changed-files@v34 - + - name: Run a step if my-file.txt was modified if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt') run: | @@ -557,7 +557,7 @@ See [inputs](#inputs) for more information. uses: tj-actions/changed-files@v34 with: since: "2022-08-19" - + - name: Get changed-files until 2022-08-20 id: changed-files-until uses: tj-actions/changed-files@v34 @@ -593,6 +593,8 @@ This package was created with [Cookiecutter](https://github.com/cookiecutter/coo * [tj-actions/demo](https://github.com/tj-actions/demo) * [tj-actions/demo2](https://github.com/tj-actions/demo2) * [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger) +* [tj-actions/auto-doc](https://github.com/tj-actions/auto-doc) +* \[tj-actions/verify-changed-files]\(https://github.com/tj-actions/verify-changed-files ## Report Bugs diff --git a/diff-sha.sh b/diff-sha.sh index fe7b6a00..f2ba2b87 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -18,12 +18,12 @@ if [[ -n $INPUT_PATH ]]; then cd "$REPO_DIR" fi -echo "Verifying git version..." - function __version() { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } +echo "Verifying git version..." + GIT_VERSION=$(git --version | awk '{print $3}') && exit_status=$? || exit_status=$? if [[ $exit_status -ne 0 ]]; then @@ -32,7 +32,7 @@ if [[ $exit_status -ne 0 ]]; then fi if [[ $(__version "$GIT_VERSION") -lt $(__version "2.18.0") ]]; then - echo "::error::Invalid git version. Please upgrade git ($GIT_VERSION) to >= (2.18.0)" + echo "::error::Invalid git version. Please upgrade ($GIT_VERSION) to >= (2.18.0)" exit 1 else echo "Valid git version found: ($GIT_VERSION)" @@ -119,6 +119,8 @@ if [[ -z $GITHUB_BASE_REF ]]; then INITIAL_COMMIT="true" PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA") echo "::warning::Initial commit detected no previous commit found." + else + PREVIOUS_SHA=$(git rev-parse "$PREVIOUS_SHA^1") fi else if [[ -z "$PREVIOUS_SHA" ]]; then