From 0699b9f9e771b0f34a1662b8afd059b06a49cef5 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 7 Dec 2021 04:50:34 +0100 Subject: [PATCH] rename reusable workflow 'Params' to 'Parameters' --- .github/workflows/{Params.yml => Parameters.yml} | 10 +++++----- ExamplePipeline.yml | 2 +- README.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename .github/workflows/{Params.yml => Parameters.yml} (92%) diff --git a/.github/workflows/Params.yml b/.github/workflows/Parameters.yml similarity index 92% rename from .github/workflows/Params.yml rename to .github/workflows/Parameters.yml index 2f74ef2..66102d3 100644 --- a/.github/workflows/Params.yml +++ b/.github/workflows/Parameters.yml @@ -1,4 +1,4 @@ -name: Params +name: Parameters on: workflow_call: @@ -20,14 +20,14 @@ on: outputs: params: description: "Parameters to be used in other jobs." - value: ${{ jobs.Params.outputs.params }} + value: ${{ jobs.Parameters.outputs.params }} python_jobs: description: "List of Python versions to be used in the matrix of other jobs." - value: ${{ jobs.Params.outputs.python_jobs }} + value: ${{ jobs.Parameters.outputs.python_jobs }} jobs: - Params: + Parameters: runs-on: ubuntu-latest outputs: params: ${{ steps.params.outputs.params }} @@ -50,7 +50,7 @@ jobs: } } print(f'::set-output name=params::{params!s}') - print("Params:") + print("Parameters:") print(params) data = { diff --git a/ExamplePipeline.yml b/ExamplePipeline.yml index 383deac..e79210c 100644 --- a/ExamplePipeline.yml +++ b/ExamplePipeline.yml @@ -8,7 +8,7 @@ jobs: # This job is a workaround for global variables # See https://github.com/actions/runner/issues/480 Params: - uses: pyTooling/Actions/.github/workflows/Params.yml@main + uses: pyTooling/Actions/.github/workflows/Parameters.yml@main with: name: ToolName # Optional diff --git a/README.md b/README.md index de87c38..1093825 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ In dispatchable Workflows, the object is `${{ github.event.inputs }}`, while cal As a result, in order to make a reusable workflow dispatchable, a wrapper workflow is required. See, for instance, [hdl/containers: .github/workflows/common.yml](https://github.com/hdl/containers/blob/main/.github/workflows/common.yml) and [hdl/containers: .github/workflows/dispatch.yml](https://github.com/hdl/containers/blob/main/.github/workflows/dispatch.yml). -Alternatively, a normalisation job might be used, similar to the `Params` in this repo. +Alternatively, a normalisation job might be used, similar to the `Parameters` in this repo. ### Call hierarchy @@ -86,7 +86,7 @@ Optionally, coverage and static type check reports can be gathered. As shown in the screenshot above, the expected order is: - Global: - - [Params](.github/workflows/Params.yml): a workaround for the limitations to handle global variables in + - [Parameters](.github/workflows/Parameters.yml): a workaround for the limitations to handle global variables in GitHub Actions workflows (see [actions/runner#480](https://github.com/actions/runner/issues/480)). It generates outputs with artifact names and job matrices to be used in other jobs. - Code testing/analysis: @@ -139,7 +139,7 @@ As shown in the screenshot above, the expected order is: Python package/tool developers can copy it into their repos, in order to use al the reusable workflows straightaway. Minimal required modifications are the following: -- Set the `name` input of job `Params`. +- Set the `name` input of job `Parameters`. - Specify the `commands` input of job `StaticTypeCheck`. Find further usage cases in the following list of projects: