Skip to content

Check news

Check news #41277

Workflow file for this run

name: Check news
on:
schedule:
# The shortest interval you can run scheduled workflows is once every 5 minutes. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '*/5 * * * *'
jobs:
update:
name: Update
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set up Node LTS
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: yarn install
- name: Update news
run: yarn news:update
- name: Save last title to output
run: |
echo "LAST_TITLE=$(cat news.min.json | grep -oP '(?<="title":").*?[^\\](?=",)' | head -1)" >> $GITHUB_OUTPUT
id: title
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'chore: πŸ€– Update news β€” ${{ steps.title.outputs.LAST_TITLE }}'
author_name: GitHub Actions
author_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}