Skip to content

action to detect a keyword in the commit summary line - #4764

Merged
keewis merged 3 commits into
pydata:masterfrom
keewis:ci-trigger-action
Jan 5, 2021
Merged

action to detect a keyword in the commit summary line#4764
keewis merged 3 commits into
pydata:masterfrom
keewis:ci-trigger-action

Conversation

@keewis

@keewiskeewis commented Jan 5, 2021

Copy link
Copy Markdown
Collaborator

follow-up to #4729 and #4730

To use the detect-ci-trigger action in workflows, add a new job:

detect-ci-trigger:
name: Detect CI Triggerruns-on: ubuntu-latestoutputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/detect-ci-triggerid: detect-triggerwith:
keyword: "<keyword>"

then require the new job in jobs that should be conditionally skipped:

my-ci-job:
runs-on: ubuntu-latestneeds: detect-ci-triggerif: needs.detect-ci-trigger.outputs.triggered == 'false' # for skip-ci# if: needs.detect-ci-trigger.outputs.triggered == 'true' # for test-upstreamsteps:
- actions/checkout@v2# ...

unfortunately, this still requires actions/checkout with fetch-depth, I can't seem to get a git fetch in the action script to work. Edit: git fetch --deepen=1 instead of git fetch --depth=2 seems to work.

cc @andersy005

@keewiskeewis added the CI Continuous Integration tools label Jan 5, 2021
@keewiskeewis changed the title action to detect keywords in the commit summary lineaction to detect a keyword in the commit summary lineJan 5, 2021
@keewis

Copy link
Copy Markdown
CollaboratorAuthor

should we merge this first and then use it in #4729 and #4730?

@andersy005andersy005 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 👍🏽

should we merge this first and then use it in #4729 and #4730?

Sounds good

@keewis

Copy link
Copy Markdown
CollaboratorAuthor

thanks for the review, @andersy005.

@keewis
keewis merged commit 0051975 into pydata:masterJan 5, 2021
@keewis
keewis deleted the ci-trigger-action branch January 5, 2021 20:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CIContinuous Integration tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@keewis@andersy005