Skip to content

Commit

Permalink
Add debug step
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ringler committed Nov 23, 2023
1 parent d1a8947 commit a3c22c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/czishrink_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
changes:
uses: ./.github/workflows/subproject-changes.yml

debug:
needs: changes
runs-on: ubuntu-latest
steps:
- run: echo czishrink ${{ needs.changes.outputs.czishrink }} czicompress ${{ needs.changes.outputs.czicompress }}

analyze:
needs: changes
if: ${{ needs.changes.outputs.czishrink == 'true' }}
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/subproject-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ on:
workflow_call:
outputs:
czishrink:
description: "true if the change affects czishrink or if github.event_name is not 'pull_request'; false otherwise"
value: ${{ jobs.changes.outputs.czishrink }}
description: "'true' if the change affects czishrink or if github.event_name is not 'pull_request'; 'false' otherwise"
value: ${{ jobs.detect_changes.outputs.czishrink }}
czicompress:
description: "true if the change affects czicompress or if github.event_name is not 'pull_request'; false otherwise"
value: ${{ jobs.changes.outputs.czishrink }}
description: "'true' if the change affects czicompress or if github.event_name is not 'pull_request'; 'false' otherwise"
value: ${{ jobs.detect_changes.outputs.czicompress }}

jobs:
# JOB to run change detection
changes:
detect_changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step for PRs, and true for other events.
outputs:
czishrink: ${{ github.event_name != 'pull_request' || steps.filter.outputs.czishrink == 'true' }}
czicompress: ${{ github.event_name != 'pull_request' || steps.filter.outputs.czicompress == 'true' }}
czishrink: ${{ steps.result.outputs.czishrink }}
czicompress: ${{ steps.result.outputs.czicompress }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v2
Expand All @@ -37,7 +37,15 @@ jobs:
filters: |
czishrink:
- 'czishrink/**'
- '.github/**'
- '*.yml'
czicompress:
- '**czicompress**'
- '.github/**'
- '*.yml'
- id: result
run: |
echo "czishrink=${{ github.event_name != 'pull_request' || steps.filter.outputs.czishrink == 'true' }}"
echo "czicompress=${{ github.event_name != 'pull_request' || steps.filter.outputs.czicompress == 'true' }}"
echo "czishrink=${{ github.event_name != 'pull_request' || steps.filter.outputs.czishrink == 'true' }}" >> "$GITHUB_OUTPUT"
echo "czicompress=${{ github.event_name != 'pull_request' || steps.filter.outputs.czicompress == 'true' }}" >> "$GITHUB_OUTPUT"

0 comments on commit a3c22c2

Please sign in to comment.