Skip to content

Commit

Permalink
feat: add ability to disable linting on dotnet common workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-muscatello-zupit committed Feb 23, 2024
1 parent 1d2c1ab commit c3ec7e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/dotnet-workflow-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ on:
DOTNET_IMAGE:
required: true
type: string
CONTAINER_CI_LABELS:
required: true
type: string
DOTNET_IMAGE_ENV_VARIABLES:
required: false
type: string
default: '{}'
CONTAINER_CI_LABELS:
required: true
type: string
CSHARPIER_VERSION:
required: false
type: string
default: ''
RUN_LINT:
required: false
type: boolean
default: true

jobs:
dotnet-common:
Expand Down Expand Up @@ -51,6 +55,7 @@ jobs:

- name: Lint
uses: zupit-it/pipeline-templates/.github/actions/dotnet/[email protected]
if: ${{ inputs.RUN_LINT == 'true' }}
with:
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }}

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,12 @@ It requires these inputs:
- **CONTAINER_CI_LABELS**: the _labels_ to select the correct _github-runner_ that will execute workflows **WITHOUT** docker. The format is a stringified JSON list of labels.
- **DOTNET_IMAGE**: the .NET docker image (usually 'mcr.microsoft.com/dotnet/sdk') to use.

In addition, it is possible to specify these optional inputs:
- **DOTNET_IMAGE_ENV_VARIABLES**: The environment variables to set when running the .NET docker image.
- **CSHARPIER_VERSION**: The version of the CSharpier tool to use. For the default value, see the `dotnet/format` action.
- **RUN_LINT**: Whatever or not the lint command should be executed. By default, it is **true**.


This is an example to show how data should be formatted.

```yaml
Expand Down

0 comments on commit c3ec7e1

Please sign in to comment.