Skip to content

Commit 1bbc368

Browse files
committed
Change strategy to use step names.
- Logs endpoint sometimes does not return anything until the job is complete. - This major limitation means that you cannot do any realtime reactiveness.
1 parent 21c484f commit 1bbc368

File tree

13 files changed

+1603
-16426
lines changed

13 files changed

+1603
-16426
lines changed

.github/workflows/dispatch.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
name: action-test
2-
# on:
3-
# workflow_dispatch:
4-
# inputs:
5-
# distinct_id:
6-
# required: true
7-
# cake: # Test for input passthrough.
8-
# required: true
9-
102
on:
113
workflow_dispatch:
124
inputs:
@@ -19,7 +11,7 @@ jobs:
1911
test:
2012
runs-on: ubuntu-latest
2113
steps:
22-
- name: echo distinct ID
14+
- name: echo distinct ID ${{ github.event.inputs.distinct_id }}
2315
run: echo ${{ github.event.inputs.distinct_id }}
2416
- name: echo input passthrough
2517
run: echo ${{ github.event.inputs.cake }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
workflow_timeout_seconds: 30
3030
- name: Evaluate that the Run ID output has been set
3131
run: |
32-
if ["${{ steps.return_dispatch.outputs.run_id }}" == ""]; then
32+
if [ "${{ steps.return_dispatch.outputs.run_id }}" == "" ]; then
3333
echo "Failed to return Run ID"
3434
exit 1
3535
fi

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ steps:
3232
3333
### Receiving Repository Action
3434
35+
In the earliest possible stage for the Action, add the input into the name.
36+
3537
Simply `echo` the input as early as possible in the run.
3638

3739
```yaml
@@ -81,8 +83,8 @@ For the sake of transparency please note that this action uses the following API
8183
- GET `/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`
8284
- Permissions:
8385
- `repo`
84-
- [Download workflow run logs](https://docs.github.com/en/rest/reference/actions#download-workflow-run-logs)
85-
- GET `/repos/{owner}/{repo}/actions/runs/{run_id}/logs`
86+
- [List jobs for a workflow run](https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run)
87+
- GET `/repos/{owner}/{repo}/actions/runs/{run_id}/jobs`
8688
- Permissions:
8789
- `repo`
8890
- `actions:read`
@@ -109,7 +111,7 @@ The consequence of not being provided with something to identify the run is that
109111
110112
▼ ┌───────────────┐
111113
┌────────────────┐ │ │
112-
│ │ │ Download logs
114+
│ │ │ Request steps
113115
│ Request top 10 ├────────────────►│ │
114116
│ │ │ for each run │
115117
│ workflow runs │ │ │

0 commit comments

Comments
 (0)