Update caller.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Caller Workflow | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
call-secondary-workflow: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger the secondary workflow | ||
id: trigger | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const response = await github.rest.actions.createWorkflowDispatch({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
workflow_id: "responder.yml", // Name des zweiten Workflows | ||
ref: "main", // Ziel-Branch | ||
inputs: { | ||
TEST: "Hello from Caller" | ||
} | ||
}); | ||
core.setOutput("response", "Workflow dispatched successfully!"); | ||
- name: Debug response | ||
run: echo "Trigger Response: ${{ steps.trigger.outputs.response }}" | ||