Download build artifacts action configuration - #285
Conversation
Co-authored-by: revenaugh.david <revenaugh.david@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: revenaugh.david <revenaugh.david@gmail.com>
…guration-claude-4.5-opus-high-thinking-cf40
There was a problem hiding this comment.
Pull request overview
This PR adds two GitHub Actions configurations to workflow files: a cache action in ci.yml and a download-artifact action in ci-cd.yml. However, both actions are added with incomplete configurations - all parameters are left empty with only inline comments showing the available options.
Key Changes:
- Added
actions/cache@v4.3.0step in the CI workflow build-and-test job - Added
actions/download-artifact@v6.0.0step in the CI/CD workflow release job
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Added cache action with empty parameter configuration before the "Show tool versions" step |
.github/workflows/ci-cd.yml |
Added download-artifact action with empty parameter configuration in the release job before changelog generation |
| fetch-depth: 0 | ||
|
|
||
|
|
||
| - name: Download a Build Artifact |
There was a problem hiding this comment.
The step name "Download a Build Artifact" uses the singular "Artifact" but the action may download multiple artifacts when no name is specified. Consider renaming to "Download Build Artifacts" (plural) for clarity, or specify which specific artifact should be downloaded and keep the singular form.
| - name: Download a Build Artifact | |
| - name: Download Build Artifacts |
| - name: Cache | ||
| uses: actions/cache@v4.3.0 | ||
| with: | ||
| # A list of files, directories, and wildcard patterns to cache and restore | ||
| path: | ||
| # An explicit key for restoring and saving the cache | ||
| key: | ||
| # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | ||
| restore-keys: # optional | ||
| # The chunk size used to split up large files during upload, in bytes | ||
| upload-chunk-size: # optional | ||
| # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | ||
| enableCrossOsArchive: # optional, default is false | ||
| # Fail the workflow if cache entry is not found | ||
| fail-on-cache-miss: # optional, default is false | ||
| # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | ||
| lookup-only: # optional, default is false | ||
| # Run the post step to save the cache even if another step before fails | ||
| save-always: # optional, default is false |
There was a problem hiding this comment.
The cache action is missing required parameters 'path' and 'key' which are mandatory for the action to function. Without these parameters, the cache action will fail during workflow execution. The 'path' parameter should specify what directories to cache (e.g., Cargo cache, node_modules), and 'key' should define a unique cache identifier (e.g., using runner OS and hash of lock files).
| - name: Cache | |
| uses: actions/cache@v4.3.0 | |
| with: | |
| # A list of files, directories, and wildcard patterns to cache and restore | |
| path: | |
| # An explicit key for restoring and saving the cache | |
| key: | |
| # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | |
| restore-keys: # optional | |
| # The chunk size used to split up large files during upload, in bytes | |
| upload-chunk-size: # optional | |
| # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | |
| enableCrossOsArchive: # optional, default is false | |
| # Fail the workflow if cache entry is not found | |
| fail-on-cache-miss: # optional, default is false | |
| # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | |
| lookup-only: # optional, default is false | |
| # Run the post step to save the cache even if another step before fails | |
| save-always: # optional, default is false | |
| - name: Cache Rust build artifacts | |
| uses: actions/cache@v4.3.0 | |
| with: | |
| path: | | |
| ~/.cargo/bin | |
| ~/.cargo/registry/index | |
| ~/.cargo/registry/cache | |
| ~/.cargo/git/db | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- |
| - name: Download a Build Artifact | ||
| uses: actions/download-artifact@v6.0.0 | ||
| with: | ||
| # Name of the artifact to download. If unspecified, all artifacts for the run are downloaded. | ||
| name: # optional | ||
| # IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both. | ||
| artifact-ids: # optional | ||
| # Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE | ||
| path: # optional | ||
| # A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified. | ||
| pattern: # optional | ||
| # When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. | ||
| merge-multiple: # optional, default is false | ||
| # The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run. | ||
| github-token: # optional | ||
| # The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from. | ||
| repository: # optional, default is ${{ github.repository }} | ||
| # The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from. | ||
| run-id: # optional, default is ${{ github.run_id }} | ||
|
|
There was a problem hiding this comment.
The download-artifact action is not configured with any parameters to specify which artifact to download. In the ci-cd.yml workflow, there are no upload-artifact steps that would create artifacts for this release job to download. The release job depends on 'docker' and 'integration' jobs, but neither of these jobs upload artifacts. This will cause the action to attempt downloading all artifacts from the current workflow run, which may not be the intended behavior. Either specify the 'name' or 'pattern' parameter to download specific artifacts, or add corresponding upload-artifact steps in the prerequisite jobs.
| - name: Download a Build Artifact | |
| uses: actions/download-artifact@v6.0.0 | |
| with: | |
| # Name of the artifact to download. If unspecified, all artifacts for the run are downloaded. | |
| name: # optional | |
| # IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both. | |
| artifact-ids: # optional | |
| # Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE | |
| path: # optional | |
| # A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified. | |
| pattern: # optional | |
| # When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. | |
| merge-multiple: # optional, default is false | |
| # The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run. | |
| github-token: # optional | |
| # The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from. | |
| repository: # optional, default is ${{ github.repository }} | |
| # The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from. | |
| run-id: # optional, default is ${{ github.run_id }} |
| # A list of files, directories, and wildcard patterns to cache and restore | ||
| path: | ||
| # An explicit key for restoring and saving the cache | ||
| key: | ||
| # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | ||
| restore-keys: # optional | ||
| # The chunk size used to split up large files during upload, in bytes | ||
| upload-chunk-size: # optional | ||
| # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | ||
| enableCrossOsArchive: # optional, default is false | ||
| # Fail the workflow if cache entry is not found | ||
| fail-on-cache-miss: # optional, default is false | ||
| # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | ||
| lookup-only: # optional, default is false | ||
| # Run the post step to save the cache even if another step before fails | ||
| save-always: # optional, default is false |
There was a problem hiding this comment.
All optional parameters are included with empty values and comments in the action configuration. This creates unnecessary noise and makes the workflow harder to read. GitHub Actions automatically uses default values for optional parameters when they are not specified. Remove all the commented optional parameters and only include the parameters that need to be explicitly configured.
| # A list of files, directories, and wildcard patterns to cache and restore | |
| path: | |
| # An explicit key for restoring and saving the cache | |
| key: | |
| # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | |
| restore-keys: # optional | |
| # The chunk size used to split up large files during upload, in bytes | |
| upload-chunk-size: # optional | |
| # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | |
| enableCrossOsArchive: # optional, default is false | |
| # Fail the workflow if cache entry is not found | |
| fail-on-cache-miss: # optional, default is false | |
| # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | |
| lookup-only: # optional, default is false | |
| # Run the post step to save the cache even if another step before fails | |
| save-always: # optional, default is false | |
| path: | |
| key: |
| with: | ||
| # Name of the artifact to download. If unspecified, all artifacts for the run are downloaded. | ||
| name: # optional | ||
| # IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both. | ||
| artifact-ids: # optional | ||
| # Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE | ||
| path: # optional | ||
| # A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified. | ||
| pattern: # optional | ||
| # When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. | ||
| merge-multiple: # optional, default is false | ||
| # The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run. | ||
| github-token: # optional | ||
| # The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from. | ||
| repository: # optional, default is ${{ github.repository }} | ||
| # The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from. | ||
| run-id: # optional, default is ${{ github.run_id }} |
There was a problem hiding this comment.
All optional parameters are included with empty values and comments in the action configuration. This creates unnecessary noise and makes the workflow harder to read. GitHub Actions automatically uses default values for optional parameters when they are not specified. Remove all the commented optional parameters and only include the parameters that need to be explicitly configured.
| with: | |
| # Name of the artifact to download. If unspecified, all artifacts for the run are downloaded. | |
| name: # optional | |
| # IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both. | |
| artifact-ids: # optional | |
| # Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE | |
| path: # optional | |
| # A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified. | |
| pattern: # optional | |
| # When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. | |
| merge-multiple: # optional, default is false | |
| # The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run. | |
| github-token: # optional | |
| # The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from. | |
| repository: # optional, default is ${{ github.repository }} | |
| # The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from. | |
| run-id: # optional, default is ${{ github.run_id }} |
Add
actions/download-artifact@v6.0.0toci-cd.ymlto enable downloading build artifacts in the release job.