This repository was archived by the owner on Aug 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (42 loc) · 1.48 KB
/
pull-request.yml
File metadata and controls
47 lines (42 loc) · 1.48 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
36
37
38
39
40
41
42
43
44
45
46
47
name: Pull Request on Release Branch Push
on:
push:
branches:
- 'release/**'
jobs:
auto-pull-request:
name: Release Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Readme Exists
id: check_readme_exists
uses: andstor/file-existence-action@v1
with:
files: "README.md"
allow_failure: true
- name: Check Readme Modified
id: check_readme_modified
uses: trilom/file-changes-action@v1.2.3
with:
fileOutput: ''
- name: Check Changelog Exists
id: check_changelog_exists
uses: andstor/file-existence-action@v1
with:
files: "CHANGELOG.md"
allow_failure: false
- name: Check Changelog Modified
id: check_changelog_modified
uses: trilom/file-changes-action@v1.2.3
with:
fileOutput: ''
- name: Create Pull Request
if: (steps.check_readme_exists.outputs.files_exists == 'true' && contains(steps.check_readme_modified.outputs.files_modified, 'README.md'))
|| (steps.check_changelog_exists.outputs.files_exists == 'true' && contains(steps.check_changelog_modified.outputs.files_modified, 'CHANGELOG.md'))
id: create_pull_request
uses: vsoch/pull-request-action@1.0.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_PREFIX: "release/"
PULL_REQUEST_BRANCH: "master"