-
Notifications
You must be signed in to change notification settings - Fork 7
71 lines (71 loc) · 2.39 KB
/
automation-pr.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: automation pr
'on':
push:
branches:
- feature/*
- bugfix/*
- release/*
- automation/*
jobs:
workflow-check:
name: Workflow Check
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Git Fetch
run: |
git fetch
- name: Configurator
run: |
make -C ${GITHUB_WORKSPACE}/src/configurator run-all
git status
git diff-index --quiet HEAD -- || (echo "Changes found"; git diff)
git diff-index --quiet HEAD --
runs-on: ubuntu-latest
auto-pull-request-feature:
name: Auto PR Feature
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: 'echo "##[set-output name=id;]$(echo ${GITHUB_REF#refs/heads/})"'
id: pr-id
- name: pull-request-action
id: pr-number
uses: vsoch/pull-request-action@master
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
BRANCH_PREFIX: feature/
PULL_REQUEST_BRANCH: master
PULL_REQUEST_TITLE: "WIP:\nMerge ${{ steps.pr-id.outputs.id }} into master \U0001F648\n"
PULL_REQUEST_BODY: |
An automated feature PR has been created.
Once you are ready, update the title of this PR and the body to
clearly describe what it is you are changing.
- name: Hack to triger CI
uses: dogmatic69/actions/automations/pr-toggle@master
env:
PULL_REQUEST_NUMBER: |
${{ steps.pr-number.outputs.pull_request_number }}
GITHUB_TOKEN: '${{ secrets.OWNER_TOKEN }}'
auto-pull-request-bug:
name: Auto PR BugFix
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: 'echo "##[set-output name=id;]$(echo ${GITHUB_REF#refs/heads/})"'
id: pr-id
- name: pull-request-action
uses: vsoch/pull-request-action@master
env:
GITHUB_TOKEN: '${{ secrets.OWNER_TOKEN }}'
BRANCH_PREFIX: bugfix/
PULL_REQUEST_BRANCH: master
PULL_REQUEST_TITLE: "WIP:\nMerge ${{ steps.pr-id.outputs.id }} into master \U0001F648\n"
PULL_REQUEST_BODY: |
An automated bugfix PR has been created.
Once you are ready, update the title of this PR and the body to
clearly describe what it is you are changing.