diff --git a/README.md b/README.md index 79f77b8..a0b9ae8 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,20 @@ include: where `` is the latest released tag or `main`. -If you want to leverage the `$SAST_DISABLED` variable to define or not the jobs conditionally use `include:rules`. -Otherwise all SAST jobs will always run when applicable: +If you are converting the configuration to use components and want to leverage the existing variable `$SAST_DISABLED` you could conditionally include the component using the variable: ```yaml include: - component: gitlab.com/gitlab-components/sast@main rules: - - if: $SAST_DISABLED != "true" + - if: $SAST_DISABLED == "true" || $SAST_DISABLED == "1" + when: never ``` +Otherwise all SAST jobs will always run when applicable. + +This assumes `SAST_DISABLED` variable is already defined in `.gitlab-ci.yml` with either `'true'` or `'1'` as the value. + ### Inputs | Input | Default value | Description |