Skip to content

Commit 228ff68

Browse files
committed
Removing dual use of workflow from tests
1 parent 64b7a44 commit 228ff68

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/build-test.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ jobs:
3030
workflow: Message Echo 2
3131
token: ${{ secrets.PERSONAL_TOKEN }}
3232

33-
- name: Invoke echo 1 workflow by id
34-
uses: ./
35-
with:
36-
workflow: '1854247'
37-
token: ${{ secrets.PERSONAL_TOKEN }}
38-
inputs: '{"message": "Mango jam"}'
39-
4033
- name: Update repo with build
4134
uses: mikeal/publish-to-github-action@master
4235
env:

dist/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,13 @@ function run() {
545545
try {
546546
// Required inputs
547547
const token = core.getInput('token');
548-
const workflowReference = core.getInput('workflow');
548+
const workflowName = core.getInput('workflow');
549549
// Optional inputs, with defaults
550550
const ref = core.getInput('ref') || github.context.ref;
551551
const [owner, repo] = core.getInput('repo')
552552
? core.getInput('repo').split('/')
553553
: [github.context.repo.owner, github.context.repo.repo];
554-
// Decode inputs, these MUST be a valid JSON string
554+
// Decode inputs, this MUST be a valid JSON string
555555
let inputs = {};
556556
const inputsJson = core.getInput('inputs');
557557
if (inputsJson) {
@@ -561,6 +561,10 @@ function run() {
561561
const octokit = github.getOctokit(token);
562562
// List workflows via API
563563
const workflows = yield octokit.paginate(octokit.actions.listRepoWorkflows.endpoint.merge({ owner, repo, ref, inputs }));
564+
// Debug response if ACTIONS_STEP_DEBUG is enabled
565+
core.debug('### START List Workflows response data');
566+
core.debug(JSON.stringify(workflows, null, 3));
567+
core.debug('### END: List Workflows response data');
564568
// Locate workflow by name as we need it's id
565569
const workflowFind = workflows.find((workflow) => workflow.name === workflowName);
566570
if (!workflowFind)

0 commit comments

Comments
 (0)