Always print the collected runners

This commit is contained in:
Pedro Algarvio 2024-03-27 09:24:35 +00:00
parent fd82bcab9c
commit 895b761592
6 changed files with 4 additions and 24 deletions

View file

@ -198,10 +198,6 @@ jobs:
run: |
tools ci runner-types ${{ github.event_name }}
- name: Check Defined Runners
run: |
echo '${{ steps.runner-types.outputs.runners }}' | jq -C '.'
- name: Define Jobs To Run
id: define-jobs
run: |

View file

@ -242,10 +242,6 @@ jobs:
run: |
tools ci runner-types ${{ github.event_name }}
- name: Check Defined Runners
run: |
echo '${{ steps.runner-types.outputs.runners }}' | jq -C '.'
- name: Define Jobs To Run
id: define-jobs
run: |

View file

@ -232,10 +232,6 @@ jobs:
run: |
tools ci runner-types ${{ github.event_name }}
- name: Check Defined Runners
run: |
echo '${{ steps.runner-types.outputs.runners }}' | jq -C '.'
- name: Define Jobs To Run
id: define-jobs
run: |

View file

@ -237,10 +237,6 @@ jobs:
run: |
tools ci runner-types ${{ github.event_name }}
- name: Check Defined Runners
run: |
echo '${{ steps.runner-types.outputs.runners }}' | jq -C '.'
- name: Define Jobs To Run
id: define-jobs
run: |

View file

@ -260,10 +260,6 @@ jobs:
run: |
tools ci runner-types ${{ github.event_name }}
- name: Check Defined Runners
run: |
echo '${{ steps.runner-types.outputs.runners }}' | jq -C '.'
- name: Define Jobs To Run
id: define-jobs
run: |

View file

@ -202,7 +202,7 @@ def runner_types(ctx: Context, event_name: str):
# If this is a pull request coming from the same repository, don't run anything
ctx.info("Pull request is coming from the same repository.")
ctx.info("Not running any jobs since they will run against the branch")
ctx.info("Writing 'runners' to the github outputs file")
ctx.info("Writing 'runners' to the github outputs file:\n", runners)
with open(github_output, "a", encoding="utf-8") as wfh:
wfh.write(f"runners={json.dumps(runners)}\n")
ctx.exit(0)
@ -210,7 +210,7 @@ def runner_types(ctx: Context, event_name: str):
# This is a PR from a forked repository
ctx.info("Pull request is not comming from the same repository")
runners["github-hosted"] = runners["self-hosted"] = True
ctx.info("Writing 'runners' to the github outputs file")
ctx.info("Writing 'runners' to the github outputs file:\n", runners)
with open(github_output, "a", encoding="utf-8") as wfh:
wfh.write(f"runners={json.dumps(runners)}\n")
ctx.exit(0)
@ -224,7 +224,7 @@ def runner_types(ctx: Context, event_name: str):
# This is running on a forked repository, don't run tests
ctx.info("The push event is on a forked repository")
runners["github-hosted"] = True
ctx.info("Writing 'runners' to the github outputs file")
ctx.info("Writing 'runners' to the github outputs file:\n", runners)
with open(github_output, "a", encoding="utf-8") as wfh:
wfh.write(f"runners={json.dumps(runners)}\n")
ctx.exit(0)
@ -232,7 +232,7 @@ def runner_types(ctx: Context, event_name: str):
# Not running on a fork, or the fork has self hosted runners, run everything
ctx.info(f"The {event_name!r} event is from the main repository")
runners["github-hosted"] = runners["self-hosted"] = True
ctx.info("Writing 'runners' to the github outputs file")
ctx.info("Writing 'runners' to the github outputs file:\n", runners)
with open(github_output, "a", encoding="utf-8") as wfh:
wfh.write(f"runners={json.dumps(runners)}")
ctx.exit(0)