-
Notifications
You must be signed in to change notification settings - Fork 1.3k
51 lines (43 loc) · 1.41 KB
/
update-whats-new-ids.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
name: whats-new
on:
pull_request:
types:
- opened
branches:
- main
env:
BOT_NAME: nr-opensource-bot
BOT_EMAIL: [email protected]
jobs:
update-whats-new-ids:
name: generates in-product announcements (optional)
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: develop
persist-credentials: false
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn add [email protected] [email protected]
- name: Generate new IDs
run: yarn run generate-whatsnew-ids
- name: Commit changes
id: commit-changes
run: |
git config --local user.email "${{ env.BOT_EMAIL }}"
git config --local user.name "${{ env.BOT_NAME }}"
git add ./src/data/whats-new-ids.json
git diff-index --quiet HEAD ./src/data/whats-new-ids.json || git commit -m 'chore(whats-new-ids): updated ids'
echo "commit=true" >> $GITHUB_OUTPUT
# Push directly to the `develop` branch so we get the changes included in the release PR
- name: Push Commit
if: steps.commit-changes.outputs.commit == 'true'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.DEVEX_OPENSOURCE_BOT_TOKEN }}
branch: develop