Skip to content

Simplify workflow_dispatch input handling and update checkout reference#44

Merged
suzukimain merged 1 commit intomasterfrom
update-v6
Dec 16, 2025
Merged

Simplify workflow_dispatch input handling and update checkout reference#44
suzukimain merged 1 commit intomasterfrom
update-v6

Conversation

@suzukimain
Copy link
Copy Markdown
Owner

Refactor the workflow to streamline input handling for workflow_dispatch and update the checkout reference to improve clarity and functionality. This change enhances the overall operation of the workflow.

Copilot AI review requested due to automatic review settings December 16, 2025 06:36
@suzukimain suzukimain merged commit 38f8f3c into master Dec 16, 2025
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the workflow_dispatch input handling by removing the optional ref parameter and standardizing the behavior to always checkout and install from source when manually triggered. The workflow now uses github.ref instead of a custom input parameter for determining which branch/tag to test.

  • Removed the ref input parameter from workflow_dispatch configuration
  • Updated checkout logic to always execute for workflow_dispatch events using github.ref instead of custom input
  • Modified installation logic to consistently install from source for all workflow_dispatch triggers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
ref: ${{ github.ref }}
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

Using github.ref in the checkout step may cause issues when the workflow is dispatched from the GitHub UI. For workflow_dispatch events, github.ref contains the full ref name (e.g., 'refs/heads/main'), which should work correctly with the checkout action. However, this removes the flexibility of testing different branches/tags that the previous inputs.ref parameter provided. Consider if this loss of flexibility aligns with your workflow requirements.

Copilot uses AI. Check for mistakes.
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.ref }}" != "" ]; then
echo "Installing auto_diffusers from source: ${{ inputs.ref }}"
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Installing auto_diffusers from source: ${{ github.ref }}"
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

The echo message displays the raw GitHub ref which will show the full reference path like 'refs/heads/main' or 'refs/tags/v1.0'. Consider using github.ref_name instead of github.ref here for clearer log output, as it provides just the branch or tag name without the 'refs/heads/' or 'refs/tags/' prefix.

Suggested change
echo "Installing auto_diffusers from source: ${{ github.ref }}"
echo "Installing auto_diffusers from source: ${{ github.ref_name }}"

Copilot uses AI. Check for mistakes.
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.

2 participants