Skip to content

Commit

Permalink
fix: run the paths-filter step in its own job (#370)
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
  • Loading branch information
jpower432 authored Oct 28, 2024
1 parent 469fbe8 commit cb42cfe
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions TEMPLATES/github/trestlebot-rules-transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,24 @@ concurrency:
cancel-in-progress: true

jobs:
check_rules:
runs-on: ubuntu-latest
outputs:
rules_changed: ${{ steps.changes.outputs.rules }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
rules:
- 'rules/**'
rules-transform-and-autosync:
name: Rules Transform and AutoSync
runs-on: ubuntu-latest
permissions:
contents: write
needs: check_rules
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -31,16 +44,9 @@ jobs:
with:
markdown_path: "markdown/component-definitions"
oscal_model: "compdef"
file_pattern: "*.json,markdown/*"
- name: Check if rules changed
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
rules:
- 'rules/**'
commit_message: "Autosync component definition content [skip ci]"
- name: Rules Transform
if: steps.changes.outputs.rules == 'true'
if: needs.check_rules.outputs.rules_changed == 'true'
uses: RedHatProductSecurity/trestle-bot/actions/rules-transform@main
with:
markdown_path: "markdown/component-definitions"
Expand Down

0 comments on commit cb42cfe

Please sign in to comment.