Skip to content

Commit

Permalink
Merge pull request #3 from skolemlabs/ci-check-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zbaylin authored Oct 17, 2023
2 parents 122adba + 733ce65 commit c170cc7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml 4.14.x
uses: ocaml/setup-ocaml@v2
Expand All @@ -57,3 +57,27 @@ jobs:
with:
name: html-docs
path: _build/default/_doc/_html/

check-changes:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine if CHANGES changed
id: changes-changed
uses: tj-actions/changed-files@v39
with:
files_yaml: |
changes:
- 'CHANGES'
- name: Fail if CHANGES did not change
if: steps.changes-changed.outputs.changes_any_changed == 'false'
run: |
echo "No changes made to the CHANGES file."
echo "Please update the file with your changes."
exit 1
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
1.0.0
========
- #1: initial implementation
- #2: add GitHub Actions-based CI
- #3: check if CHANGES file was edited in CI

0 comments on commit c170cc7

Please sign in to comment.