diff --git a/action.yaml b/action.yaml index a870a16..ff2e389 100644 --- a/action.yaml +++ b/action.yaml @@ -11,7 +11,12 @@ runs: using: 'composite' steps: - name: 'Call Another Action' + id: js_action uses: kengo-k/docker-build/internal/get@main with: token: ${{ inputs.token }} args: ${{ inputs.args }} + + - name: 'Display Output' + shell: bash + run: echo "Output from JS Action: ${{ steps.js_action.outputs.docker_command }}" diff --git a/internal/get/index.js b/internal/get/index.js index 462f8f5..6129095 100644 --- a/internal/get/index.js +++ b/internal/get/index.js @@ -1,6 +1,5 @@ -import { getInput, setFailed } from '@actions/core'; -import { exec } from '@actions/exec'; +import { getInput, setFailed, setOutput } from '@actions/core'; import github from '@actions/github'; import { load } from 'js-yaml'; import { z } from 'zod'; @@ -63,6 +62,8 @@ async function main() { const imageTag = imageTags.join('-'); const buildArgs = ['build', '-f', argObj.path, '-t', `${argObj.name}:${imageTag}`, '.']; console.log('Current directory:', process.cwd()); + + setOutput('docker_command', 'HELLO'); } }