-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (31 loc) · 1.01 KB
/
pushmsg.yml
File metadata and controls
35 lines (31 loc) · 1.01 KB
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
name: Changes Received
on:
push:
branches:
- vampbrain-patch-1
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Get pusher's name and commit message
id: commit_info
run: |
USER=$(git log -1 --pretty=format:'%an')
MESSAGE=$(git log -1 --pretty=format:'%s')
echo "::set-output name=user::$USER"
echo "::set-output name=message::$MESSAGE"
- name: Append to README
run: |
USER=${{ steps.commit_info.outputs.user }}
MESSAGE=${{ steps.commit_info.outputs.message }}
echo "Pushed by: $USER" >> README.md
echo "Commit Message: $MESSAGE" >> README.md
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add README.md
git commit -m "Add pusher's name and commit message"
git push