From 444e596e277c6e94277b5d42672ae4ae1c2c1d35 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Fri, 30 Sep 2022 15:25:40 -0400 Subject: [PATCH] .github: include workflow dispatch in if condition for changes --- .github/actions/changes-since-last-tag/action.yml | 6 +++++- .github/workflows/ci_release.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/changes-since-last-tag/action.yml b/.github/actions/changes-since-last-tag/action.yml index 76f6280..5719869 100644 --- a/.github/actions/changes-since-last-tag/action.yml +++ b/.github/actions/changes-since-last-tag/action.yml @@ -1,4 +1,6 @@ -# Define action name, description, and inputs +# Changes Since Last Tag is a useful helper that can check for changes in files +# based on various filters, such as extension and path. This is a useful tool +# when thinking about CI/CD to ensure we are not creating release with no diff. name: "Changes Since Last Tag" description: "Check for changes to any of the files since the last tag" inputs: @@ -15,6 +17,8 @@ runs: id: previoustag uses: "WyriHaximus/github-action-get-previous-tag@v1" with: + # NOTE: There is one bug when running this with no previous versions. As + # soon as one version exists, it works as expected. fallback: 0.0.1 # Optional fallback tag to use when no tag can be found # Use paths-filter to determine which paths have changes # https://github.com/dorny/paths-filter diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 2db381c..48d096b 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest outputs: updates: ${{steps.changes.outputs.any == 'true'}} - if: ${{ github.event_name == 'schedule' }} + if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v3 with: