-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1 KB
/
changeset.yaml
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
name: Update CHANGES File
on:
pull_request:
types: [opened]
branches:
- master
jobs:
update-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: Update CHANGES file
if: "contains(steps.changed-files.outputs.all_changed_files, 'CHANGES')"
run: |
tabs 2
echo "${{ github.event.pull_request.title }}"
echo -e "\t* ${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }}). Thanks @${{ github.actor }}" > CHANGES2
cat CHANGES >> CHANGES2
mv CHANGES2 CHANGES
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
message: "Update CHANGES file"