Skip to content

Conversation

@vgarciabnz
Copy link
Member

Adds the workflow_dispatch modifier to the main workflow, so it can be manually run if needed. The workflow_dispatch will only work in the main branch.

@vgarciabnz vgarciabnz requested review from jbee and superskip February 28, 2025 08:30
Copy link
Collaborator

@superskip superskip left a comment

Choose a reason for hiding this comment

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

if: ${{ !contains(github.event.pull_request.title, '[skip publish]') }}

If you trigger the jobs with a workflow_dispatch event, then I suppose event.pull_request will be undefined, and this expression will throw. This could in turn mean the if-test will fail in this case?

@vgarciabnz
Copy link
Member Author

Github actions seems to chain the undefined behavior so github.event.pull_request.title is just undefined if github.event.pull_request is undefined. It happens the same in the first step, with github.event.pull_request.merged == true.

@superskip superskip self-requested a review February 28, 2025 09:05
@vgarciabnz vgarciabnz merged commit 0da2b3f into main Feb 28, 2025
2 checks passed
@vgarciabnz vgarciabnz deleted the enable-main-workflow-as-dispatch branch February 28, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants