Validate required inputs are set before invoking an action
**Describe the bug** I have the following **action.yml**: ``` name: 'Anka Prepare VM and execute inside' description: 'Prepare an Anka VM and execute commands inside' author: Veertu branding: icon: 'anchor' color: 'blue' inputs: anka-template: description: 'name or UUID of Anka Template' required: true ``` My **index.js** looks like: ``` const core = require('@actions/core'); const io = require('@actions/io'); const prepare = require('./prepare'); const execute = require('./execute'); // most @actions toolkit packages have async methods async function run() { try { const ankaVirtCLIPath = await io.which('anka', true) console.log(`Anka Virtualization CLI found at: ${ankaVirtCLIPath}`) const ankaTemplate = core.getInput('anka-template'); const ankaTag = core.getInput('anka-tag'); const ankaCommands = core.getInput('commands'); const hostPreCommands = core.getInput('host-pre-commands'); const hostPostCommands = core.getInput('host-post-commands'); console.log("=========================" + "\n" + `${hostPreCommands}` + "\n" + "=================================") console.log("=========================" + "\n" + `${hostPostCommands}` + "\n" + "=================================") console.log("=========================" + "\n" + `${ankaCommands}` + "\n" + "=================================") if (hostPreCommands) { await execute.nodeCommands(hostPreCommands) } // Prepare VM await prepare.ankaRegistryPul
Posted by NorseGaud on Jun 1, 2020, 7:41 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
Validate required inputs are set before invoking an action
**Describe the bug** I have the following **action.yml**: ``` name: 'Anka Prepare VM and execute inside' description: 'Prepare an Anka VM and execute commands inside' author: Veertu branding: icon: 'anchor' color: 'blue' inputs: anka-template: description: 'name or UUID of Anka Template' required: true ``` My **index.js** looks like: ``` const core = require('@actions/core'); const io = require('@actions/io'); const prepare = require('./prepare'); const execute = require('./execute'); // most @actions toolkit packages have async methods async function run() { try { const ankaVirtCLIPath = await io.which('anka', true) console.log(`Anka Virtualization CLI found at: ${ankaVirtCLIPath}`) const ankaTemplate = core.getInput('anka-template'); const ankaTag = core.getInput('anka-tag'); const ankaCommands = core.getInput('commands'); const hostPreCommands = core.getInput('host-pre-commands'); const hostPostCommands = core.getInput('host-post-commands'); console.log("=========================" + "\n" + `${hostPreCommands}` + "\n" + "=================================") console.log("=========================" + "\n" + `${hostPostCommands}` + "\n" + "=================================") console.log("=========================" + "\n" + `${ankaCommands}` + "\n" + "=================================") if (hostPreCommands) { await execute.nodeCommands(hostPreCommands) } // Prepare VM await prepare.ankaRegistryPul
Comments (0)
No comments yet. Start the discussion.