|
| 1 | +[](https://bridge.dev/2WBms5Q) |
| 2 | +[](https://slack.bridgecrew.io/?utm_source=github&utm_medium=organic_oss&utm_campaign=checkov-action) |
| 3 | + |
| 4 | +# Yor GitHub action |
| 5 | + |
| 6 | +This GitHub Action runs [Yor](https://github.com/bridgecrewio/yor) against an Infrastructure-as-Code repository. |
| 7 | +Yor applies tags to your infrastructure allowing easier governance, ownership and visibility. |
| 8 | + |
| 9 | +## Example usage |
| 10 | + |
| 11 | +### Simple Example |
| 12 | +```yaml |
| 13 | +jobs: |
| 14 | + yor-job: |
| 15 | + steps: |
| 16 | + - name: Checkout repo |
| 17 | + uses: actions/checkout@v2 |
| 18 | + - name: Run yor action |
| 19 | + uses: bridgecrewio/yor-action@master |
| 20 | + - name: Commit tag changes |
| 21 | + uses: stefanzweifel/git-auto-commit-action@v4 |
| 22 | +``` |
| 23 | +
|
| 24 | +Note that this example uses the latest version (`master`). |
| 25 | + |
| 26 | +### Complex Examples |
| 27 | +#### Using tag + tag_groups Parameters |
| 28 | +```yaml |
| 29 | +jobs: |
| 30 | + yor-job: |
| 31 | + steps: |
| 32 | + - name: Checkout repo |
| 33 | + uses: actions/checkout@v2 |
| 34 | + - name: Run yor action |
| 35 | + uses: bridgecrewio/yor-action@master |
| 36 | + with: |
| 37 | + directory: path/to/iac |
| 38 | + skip_directory: test |
| 39 | + log_level: DEBUG |
| 40 | + tag: git_modifiers,git_commit,git_repository,yor_trace |
| 41 | + tag_groups: git,code2cloud |
| 42 | + custom_tags: path/to/plugin.so |
| 43 | + output_format: json |
| 44 | + - name: Commit tag changes |
| 45 | + uses: stefanzweifel/git-auto-commit-action@v4 |
| 46 | +``` |
| 47 | + |
| 48 | +#### Using skip_tags + tag_groups Parameters |
| 49 | +```yaml |
| 50 | +jobs: |
| 51 | + yor-job: |
| 52 | + steps: |
| 53 | + - name: Checkout repo |
| 54 | + uses: actions/checkout@v2 |
| 55 | + - name: Run yor action |
| 56 | + uses: bridgecrewio/yor-action@master |
| 57 | + with: |
| 58 | + directory: path/to/iac |
| 59 | + skip_directory: test |
| 60 | + log_level: DEBUG |
| 61 | + skip_tags: git_modifiers,git_commit,git_repository |
| 62 | + tag_groups: git |
| 63 | + custom_tags: path/to/plugin.so |
| 64 | + output_format: json |
| 65 | + - name: Commit tag changes |
| 66 | + uses: stefanzweifel/git-auto-commit-action@v4 |
| 67 | +``` |
0 commit comments