Skip to content

Conversation

@finger563
Copy link
Contributor

Description

  • Change zipfile-id to not be required and have default value of ''
  • Add input zipfile-name (also not required) with default value of ''
  • Add steps to check that exactly one of zipfile-id and zipfile-name is set

Motivation and Context

In some cases (such as via matrix strategy) you cannot easily use the zipfile-id as input because getting the output from matrix steps can be tricky. Allowing name to be provided helps in such cases.

How has this been tested?

It hasn't yet. 😅

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

@finger563 finger563 requested a review from Copilot May 15, 2025 13:30
@finger563 finger563 assigned finger563 and unassigned finger563 May 15, 2025
@finger563 finger563 added enhancement New feature or request inputs labels May 15, 2025
Copy link

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 introduces support for providing a zipfile by name instead of solely by ID, along with appropriate validation to ensure that only one of the two inputs is set.

  • Updated input definitions for “zipfile-id” and added “zipfile-name” with default values
  • Added validation steps to enforce that exactly one input is provided
  • Updated README documentation to describe the new usage option

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
action.yml Modified inputs and added validation steps for mutually exclusive zipfile inputs; updated download-artifact step
README.md Updated documentation and examples to highlight the new input option

uses: actions/download-artifact@v4
id: download_zipfile
with:
name: ${{ inputs.zipfile-name }}
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

In the download-artifact step, both 'zipfile-name' and 'zipfile-id' are always passed to the action. Consider conditionally providing only the set input, so that the action receives a single valid value and avoids potential unexpected behavior when one of the inputs is empty.

Copilot uses AI. Check for mistakes.
@finger563 finger563 merged commit 41a9133 into main May 15, 2025
@finger563 finger563 deleted the feat/zipfile-name branch May 15, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request inputs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants