generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 40
67 lines (57 loc) · 2.15 KB
/
release-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
name: Update release notes
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
inputs:
time_range_hours:
description: 'SDK released within x hours'
required: true
default: '24'
schedule:
- cron: '00 00 * * *'
# At 00:00 everyday
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update-bom:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: main
- name: Check existing PRs
run: |
if gh pr list --repo ${{ github.server_url }}/${{ github.repository }} --json title | grep 'Updating release notes for BOM'; then
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
else
echo "Not found existing PRs"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update releases notes (for BOM)
run: node .github/scripts/update-release-notes.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.time_range_hours }} debug
- name: Check release-notes/index.md
run: |
if git diff --exit-code ./src/pages/home/release-notes/index.md; then
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
else
echo "./src/pages/home/release-notes/index.md -> no update"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ github.token }}
commit-message: Updating release notes for BOM
branch: update-release-notes
delete-branch: true
labels: |
release-notes
automated pr
title: "Updating release notes for BOM"
body: This PR is automatically created by [update-release-notes] action.