-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: [Action] allow this repository also to be used as GitHub Action (#…
…16)
- Loading branch information
Showing
5 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'OpenTTD Commit Checker' | ||
author: 'OpenTTD Dev Team' | ||
description: 'Checker for commits done to OpenTTD projects' | ||
inputs: {} | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: ${{ github.action_path }}/action/entrypoint.sh ${{ github.action_path }} | ||
shell: bash | ||
branding: | ||
icon: 'code' | ||
color: 'blue' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
HOOKS_DIR=$1 | ||
|
||
# Install matchers. | ||
echo "::add-matcher::${HOOKS_DIR}/action/check-diff-matcher.json" | ||
echo "::add-matcher::${HOOKS_DIR}/action/check-message-matcher.json" | ||
|
||
# Show what commits we are evaluating. | ||
git log --oneline HEAD^..HEAD^2 | ||
|
||
# Run the checker. | ||
HOOKS_DIR=${HOOKS_DIR}/hooks GIT_DIR=.git ${HOOKS_DIR}/hooks/check-commits.sh HEAD^..HEAD^2 | ||
|
||
# Remove matchers. | ||
echo "::remove-matcher owner=check-diff::" | ||
echo "::remove-matcher owner=check-message::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters