Commit cd7b6c67 authored by Jonston Chan's avatar Jonston Chan

Add regex branch filter to example

parent 14bd84e5
...@@ -216,12 +216,12 @@ jobs: ...@@ -216,12 +216,12 @@ jobs:
Example of the same workflow using `rules` in GitLab CI/CD: Example of the same workflow using `rules` in GitLab CI/CD:
```yaml ```yaml
deploy_prod: deploy:
stage: deploy stage: deploy
script: script:
- echo "Deploy to production server" - echo "Deploy job"
rules: rules:
- if: '$CI_COMMIT_BRANCH == "main"' - if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^rc-/'
``` ```
### Caching ### Caching
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment