Repository navigation
fix: VirusTotal submission workflow - #117
AdamMagued wants to merge 1 commit into
Conversation
Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c35ecdecff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| with: | ||
| vt_api_key: ${{ secrets.VT_API_KEY }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| release_id: ${{ steps.target.outputs.tag }} |
There was a problem hiding this comment.
Pass the numeric GitHub release ID
On both a release event and a non-empty manual dispatch, steps.target.outputs.tag is a tag such as v1.1.3, but cssnr/virustotal-action's release_id input is the numeric GitHub release ID. The release-assets path therefore cannot retrieve or update that release (and .github/workflows/release.yml repeats the mismatch with github.ref_name), so the newly added scan fails for the normal inputs; use github.event.release.id for release events and resolve manually supplied tags to IDs.
Useful? React with 👍 / 👎.
| if: steps.check-key.outputs.skip != 'true' | ||
| id: target | ||
| run: | | ||
| TAG="${{ inputs.release_tag || github.event.release.tag_name || github.ref_name }}" |
There was a problem hiding this comment.
Resolve the latest release when the dispatch input is blank
When workflow_dispatch is run with the documented blank default, that event has no release payload, so this expression falls through to github.ref_name (normally the selected branch such as main) rather than the latest release. That non-release value is then sent to the scan step, making the advertised "leave blank for latest release" path fail; query the latest release or require a tag instead.
Useful? React with 👍 / 👎.
Fixes #114
Solution
Verified with container sandbox test suite.