-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (35 loc) · 1.24 KB
/
install_git_hooks_macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# THIS ACTION IS FOR VALIDATION WITHIN TEMPLATE REPO, AND WILL BE
# REMOVED UPON RUNNING RENAMETEMPLATE GRADLE TASK.
name: Install MacOS Hooks
# This will cancel any in progress workflows for the same PR, if
# multiple pushes happen in quick succession.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: pull_request
jobs:
install-macos-hooks:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Install
run: ./gradlew installGitHooks
- name: Check Pre-Commit File
uses: GuillaumeFalourd/[email protected]
with:
command_line: cat .git/hooks/pre-commit
assert_file_path: git-hooks/pre-commit-macos.sh
expected_result: PASSED
- name: Check Pre-Push File
uses: GuillaumeFalourd/[email protected]
with:
command_line: cat .git/hooks/pre-push
assert_file_path: git-hooks/pre-push-macos.sh
expected_result: PASSED