File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run precommit checks on self
2+ on : pull_request
3+ jobs :
4+ log-github-event-goodies :
5+ name : " Log everything on GitHub Event"
6+ runs-on : ubuntu-latest
7+ steps :
8+ - name : Logging
9+ run : |
10+ echo "${{toJSON(github.event)}}"
11+ precommit-check :
12+ runs-on : ${{ matrix.os }}
13+ strategy :
14+ matrix :
15+ os : [ ubuntu-latest, macos-latest, windows-latest ]
16+ steps :
17+ - uses : actions/checkout@v2
18+ with :
19+ ref : ${{ github.head_ref }}
20+ fetch-depth : 0
21+ - uses : actions/setup-python@v2
22+ with :
23+ python-version : " 3.7"
24+ - name : Get the commit message
25+ run : |
26+ echo 'commit_message<<EOF' >> $GITHUB_ENV
27+ git log --format=%B -n 1 ${{ github.event.after }} >> $GITHUB_ENV
28+ echo 'EOF' >> $GITHUB_ENV
29+ - name : message1
30+ run : echo "The message is ${{ github.event.head_commit.message }}"
31+ - name : message2
32+ run : echo "The message is ${{ github.event.commits[0].message }}"
33+ - uses : ccdc-opensource/commit-hooks@update_status_check
34+ with :
35+ commitMessage : ${{ env.commit_message }}
You can’t perform that action at this time.
0 commit comments