-
Notifications
You must be signed in to change notification settings - Fork 106
57 lines (48 loc) · 1.63 KB
/
update-releases.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
name: Update Releases
on:
push:
# schedule:
# - cron: "0 */4 * * *"
permissions:
contents: write
pull-requests: write
jobs:
update-releases:
# if: github.repository == 'tailcallhq/tailcallhq.github.io' && github.ref == 'refs/heads/develop'
if: github.repository == 'tailcallhq/tailcallhq.github.io'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Run npm Install
run: npm install
- name: Run Releases Docs Generator Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node release-notes-generator.js
- name: Check for Existing Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
EXISTING_PR=$(gh pr list --state open --base develop --json headRefName --jq '.[] | select(.headRefName | startswith("update-releases")) | .headRefName')
echo "existing_pr_branch=$EXISTING_PR" >> $GITHUB_ENV
- name: Create Pull Request
if: env.existing_pr_branch == ''
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: updated releases"
branch: update-releases
branch-suffix: timestamp
base: develop
title: "chore: updated releases"
body: |
This is an auto-generated pull request that updates releases.
reviewers: tusharmath
maintainer-can-modify: true