-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Runner BugBug fix scope to the runnerBug fix scope to the runnerbugSomething isn't workingSomething isn't working
Description
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.ankaRegistryPull(ankaTemplate,ankaTag)
// Run commands inside VM
// Cleanup
if (hostPostCommands) {
await execute.nodeCommands(hostPostCommands)
}
} catch (error) {
core.setFailed(error);
}
}
run()
and finally, the important part of my .github/workflows/test.yml:
- name: basic commands
id: basic
uses: ./
with:
commands: |
env
ls -laht ./
ls -laht ../
pwd
echo "HERE" && \
echo "THERE HERE WHERE"
Yet, there is no failure for missing anka-template... It fails for a reason inside of the ankaRegistryPull function which is well after it tries to load the input.
https://help.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs seems to indicate that it shouldn't allow the action to run if it's missing that input.
What am I missing?
aggenebbisj, jw-maynard, rcowsill, AlekSi, gajus and 74 moreeine, numbsafari, spakanati, pavel-ivanko-gismart, builtroller and 1 more
Metadata
Metadata
Assignees
Labels
Runner BugBug fix scope to the runnerBug fix scope to the runnerbugSomething isn't workingSomething isn't working