Compare commits

...

5 Commits

6 changed files with 29 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ jobs:
git submodule update --remote --recursive git submodule update --remote --recursive
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v4.1.2 uses: peter-evans/create-pull-request@v4.1.3
with: with:
title: "Updated submodule" title: "Updated submodule"
branch: "chore/update-submodule" branch: "chore/update-submodule"

View File

@@ -26,7 +26,7 @@ jobs:
with: with:
output: 'HISTORY.md' output: 'HISTORY.md'
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v4.1.2 uses: peter-evans/create-pull-request@v4.1.3
with: with:
base: "main" base: "main"
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}" title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"

View File

@@ -136,14 +136,7 @@ jobs:
- name: Run changed-files with a single commit history - name: Run changed-files with a single commit history
id: changed-files id: changed-files
continue-on-error: true
uses: ./ uses: ./
- name: Exit with 1 if no error is raised
if: github.event_name == 'pull_request' && steps.changed-files.outcome != 'failure'
run: |
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
exit 1
- name: Show output - name: Show output
run: | run: |

View File

@@ -31,7 +31,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
if: failure() if: failure()
uses: peter-evans/create-pull-request@v4.1.2 uses: peter-evans/create-pull-request@v4.1.3
with: with:
base: "main" base: "main"
title: "Updated README.md" title: "Updated README.md"

View File

@@ -1,12 +1,21 @@
# Changelog # Changelog
## [v31.0.0](https://github.com/tj-actions/changed-files/tree/v31.0.0) (2022-09-25) ## [v31.0.1](https://github.com/tj-actions/changed-files/tree/v31.0.1) (2022-09-25)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.0) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.1)
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-09-25) ## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-09-25)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v30.0.0...v31) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.0...v31)
**Merged pull requests:**
- fix: bug with force pushed commits [\#651](https://github.com/tj-actions/changed-files/pull/651) ([jackton1](https://github.com/jackton1))
- Upgraded to v31.0.0 [\#650](https://github.com/tj-actions/changed-files/pull/650) ([jackton1](https://github.com/jackton1))
## [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)
**Merged pull requests:** **Merged pull requests:**
@@ -19,13 +28,13 @@
- chore: update broken link [\#642](https://github.com/tj-actions/changed-files/pull/642) ([jackton1](https://github.com/jackton1)) - 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)) - Upgraded to v30.0.0 [\#641](https://github.com/tj-actions/changed-files/pull/641) ([jackton1](https://github.com/jackton1))
## [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/v30...v30.0.0)
## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24) ## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v30) [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)
**Fixed bugs:** **Fixed bugs:**
@@ -1497,7 +1506,7 @@
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09) ## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
**Closed issues:** **Closed issues:**
@@ -1513,13 +1522,13 @@
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate)) - Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1)) - Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v6)
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26) ## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v6.3)
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
**Merged pull requests:** **Merged pull requests:**

View File

@@ -62,6 +62,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$? CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
git fetch --no-tags -u --progress origin --depth=2 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
PREVIOUS_SHA="" PREVIOUS_SHA=""
if [[ "$GITHUB_EVENT_FORCED" == "false" ]]; then if [[ "$GITHUB_EVENT_FORCED" == "false" ]]; then
@@ -105,9 +106,11 @@ else
echo "::debug::GITHUB_BASE_REF: $TARGET_BRANCH..." echo "::debug::GITHUB_BASE_REF: $TARGET_BRANCH..."
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
git fetch --no-tags -u --progress origin --depth=1 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$GITHUB_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$? PREVIOUS_SHA=$GITHUB_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
echo "::debug::Previous SHA: $PREVIOUS_SHA" echo "::debug::Previous SHA: $PREVIOUS_SHA"
else else
git fetch --no-tags -u --progress origin --depth=1 "$(git rev-parse --verify "$INPUT_BASE_SHA")" && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$INPUT_BASE_SHA PREVIOUS_SHA=$INPUT_BASE_SHA
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$? TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
echo "::debug::Previous SHA: $PREVIOUS_SHA" echo "::debug::Previous SHA: $PREVIOUS_SHA"