Skip to content

Commit

Permalink
Try to make spec finalization job work.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Dec 16, 2021
1 parent 05ce482 commit 31d2bd6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/finalized_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ on: [push, pull_request]

jobs:
change_check:
name: Path match check
name: Check if file changed
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
not_modified: ${{ steps.skip_check.outputs.should_skip }}
modified: ${{ steps.changes.outputs.modified }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
- name: Checkout repository
uses: actions/checkout@v2
with:
github_token: ${{ github.token }}
paths: '["spec/labels-v1.json"]'
fetch-depth: 0
- id: changes
# Set outputs using the command.
run: |
echo "::set-output name=modified::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep spec/labels-v1.json$ | xargs)"
unit_test:
name: Error if finalized spec modified
needs: change_check
if: ${{ needs.change_check.outputs.not_modified != 'true' }}
if: ${{ needs.change_check.outputs.modified }}
runs-on: ubuntu-18.04
steps:
- name: Fail if specs modified
Expand Down

0 comments on commit 31d2bd6

Please sign in to comment.