Skip to content

Update release notes #228

Update release notes

Update release notes #228

Workflow file for this run

name: Update release notes
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
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/checkout@v3.1.0
with:
ref: main
- name: Check existing PRs
run: |
if gh pr list --repo ${{ github.server_url }}/${{ github.repository }} --json title | grep 'Updating release notes'; 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: Yarn install
run: yarn install
- name: Update releases notes
run: node .github/scripts/release_notes/index.js ${{ secrets.GITHUB_TOKEN }}
- 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/create-pull-request@v4.2.3
with:
token: ${{ github.token }}
commit-message: Updating release notes
branch: update-release-notes
delete-branch: true
labels: |
release-notes
automated pr
title: "Updating release notes"
body: This PR is automatically created by [update-release-notes] action.