forked from SonicCloudOrg/sonic-driver-core
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 2.21 KB
/
doc.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
name: update readme doc
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: 'Get previous release tag'
id: tag
uses: "sammcoe/get-previous-release-action@v1"
- name: replace version
run: sed -i "s/${{steps.tag.outputs.tag}}/${{steps.previoustag.outputs.tag}}/g" README*.md
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update README file.
author: GitHub <[email protected]>
signoff: false
branch: doc/${{steps.previoustag.outputs.tag}}
base: main
delete-branch: true
title: 'doc: update README files version to ${{steps.previoustag.outputs.tag}}'
body: |
**在提出此拉取请求时,我确认了以下几点(保存后请点击复选框):**
- [x] 标题为fix、feat或doc开头
- [x] 我已检查没有与此请求重复的拉取请求。
- [x] 我已经考虑过,并确认这份呈件对其他人很有价值。
- [x] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。
**填写PR内容:**
- Update README files version to latest tag by bot 🚀.
draft: false
- name: Auto approve
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: juliangruber/approve-pull-request-action@v1
with:
github-token: ${{ secrets.PAT }}
number: ${{ steps.cpr.outputs.pull-request-number }}
- id: automerge
name: automerge
uses: "pascalgn/[email protected]"
env:
MERGE_LABELS: "document"
MERGE_DELETE_BRANCH: true
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }}
MERGE_RETRIES: 18
MERGE_RETRY_SLEEP: 10000