Skip to content

syllogy/yor-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Maintained by Bridgecrew.io slack-community

Yor GitHub action

This GitHub Action runs Yor against an Infrastructure-as-Code repository. Yor applies tags to your infrastructure allowing easier governance, ownership and visibility.

Example usage

Simple Example

jobs:
  yor-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Run yor action
        uses: bridgecrewio/yor-action@main

Note that this example uses the latest version (main). and that fetch-depth: 0 on checkout is required for yor

        with:
          fetch-depth: 0

Complex Examples

Using tag + tag_groups Parameters

jobs:
  yor-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Run yor action
        uses: bridgecrewio/yor-action@main
        with:
          directory: path/to/iac
          skip_directory: test
          log_level: DEBUG
          tag: git_modifiers,git_commit,git_repository,yor_trace
          tag_groups: git,code2cloud
          custom_tags: path/to/plugin.so
          output_format: json

Using skip_tags + tag_groups Parameters

jobs:
  yor-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Run yor action
        uses: bridgecrewio/yor-action@main
        with:
          directory: path/to/iac
          skip_directory: test
          log_level: DEBUG
          skip_tags: git_modifiers,git_commit,git_repository
          tag_groups: git
          custom_tags: path/to/plugin.so
          output_format: json
      - name: Commit tag changes
        uses: stefanzweifel/git-auto-commit-action@v4

Committing at your own timing instead of right after the tags were updated:

jobs:
  yor-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Run yor action
        uses: bridgecrewio/yor-action@main
        with:
          commit_changes: NO # Any value which is not YES (which is the default value) will lead to no commit

About

Github action for Yor

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published